web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

How to get Employee Dimensions

Sheikh Sohail Profile Picture Sheikh Sohail 6,125



Here is the sample code to find the dimension by Name. In the below sample code we are using cost center Dimension for searching.



static void job1(Args _args)
{
HcmEmployment                         hcmEmployment;
DimensionAttributeValueSetItem  setItem;
DimensionAttributeValue              dimAttrValue;
DimensionAttribute                      dimAttribute;
;

dimAttribute    = DimensionAttribute::findByName('CostCenter');

while select hcmEmployment
join RecId, DisplayValue from setItem
where setItem.DimensionAttributeValueSet ==
hcmEmployment.DefaultDimension
join dimAttrValue
where dimAttrValue.RecId == setItem.DimensionAttributeValue &&
dimAttrValue.DimensionAttribute == dimAttribute.RecId       &&
dimAttrValue.IsDeleted == false
{
info(strFmt("Employee = %1  %2 = %3 ",
HcmWorker::find(hcmEmployment.Worker).PersonnelNumber,
dimAttribute.Name, setItem.DisplayValue));
}
}

This was originally posted here.

Comments

*This post is locked for comments