Hi Andre,
I try the following code , it is same as the logic applied in PO approval mobile workspace. the value of the variable PurchReqTableApprovalApproveEnabledValue is always undefined so variable approveVisible is always false
//*****
var entityContextParts = params.pageContext.split(':');
var data = dataService.getEntityData(entityContextParts[0], entityContextParts[1]);
var workflowWorkItemRecord = data.getPropertyValue('WorkflowWorkItemTable');
var workflowWorkItemData = dataService.getEntityData('WorkflowWorkItemTable', workflowWorkItemRecord);
var PurchReqTableApprovalApproveEnabledValue = workflowWorkItemData.getPropertyValue('PurchReqTableApprovalApproveEnabled');
var PurchReqTableApprovalApproveEnabledKey = 'PurchReqTableApprovalApproveEnabled' + workflowWorkItemRecord;
if (undefined != PurchReqTableApprovalApproveEnabledValue)
{ metaCacheService.setData(PurchReqTableApprovalApproveEnabledKey, PurchReqTableApprovalApproveEnabledValue);
}
else
{ PurchReqTableApprovalApproveEnabledValue = metaCacheService.getData(PurchReqTableApprovalApproveEnabledKey);
}
var approveVisible = Boolean(PurchReqTableApprovalApproveEnabledValue == 1);