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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...