Hello,
Our goal is to fetch the HcmWorker's ProductLine Dimension in the ProjProjectTransactionsListPage. A user has asked that we are able to filter using this column. Previously I had create a display method using the following code to fetch the dimension correctly:
public display str productLine()
{
str productLine = "";
int i;
HcmWorker hcmWorker = HcmWorker::findByPersonnelNumber(this.ResourceId);
DimensionAttributeValueSetStorage dimStorage = DimensionAttributeValueSetStorage::find(hcmWorker.getDefaultDimension(CompanyInfo::current()));
for (i= 1 ; i<= dimStorage.elements() ; i )
{
if(DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name == "ProductLine")
{
productLine = dimStorage.getDisplayValueByIndex(i);
}
}
return productLine;
}
Since we cannot filter using a display method, I am now trying to figure out how to use the form's ResourceView to fetch the dimension. I'm not sure how to proceed since my code fetches the hcmWorker.getDefaultDimension(CompanyInfo::current()).
Is what I am trying to do even possible?
Thanks in advance.