Thursday, May 15, 2014

Position test in ax

//  Position test

static void PositionTest(Args _args)
{
    HierarchyPosition   hierarchyPosition;
    container           workerHirerchy;
    int                 i;
    int64               posi;
    str                 name;
    HcmWorker         worker;



    delete_from hierarchyPosition;
    RecursionPosition::postion(curUserId());
    while select hierarchyPosition //where currency.CurrencyCode like "E*"
    {
        workerHirerchy += hierarchyPosition.Position;
    }

    for(i=1;i<=conLen(workerHirerchy);i++)
    {
        posi = conPeek(workerHirerchy, i);
        worker = HcmWorker::find(posi);
        name   = strFmt("%1 ",worker.name());
        info(name);

    }
}

No comments:

Post a Comment

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...