Sunday, October 26, 2014

Get Worker Dept from Worker in ax 2012

// Get Worker Dept from Worker in ax 

display Name WorkerDepartmentName()
{
    HcmWorker               hcmWorker;
    str                     deptName;

    select RecId from hcmWorker
            where hcmWorker.RecId == this.UpdatedByWorker;

     deptName = hcmWorker.primaryDepartmentName();

    return deptName;

}

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...