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 :
Finance | Project Operations, Human Resources, ...
Answered

mobile work space for workflow approval

(0) ShareShare
ReportReport
Posted on by
I create PR approval mobile work space similar to standard PO approval mobile work space , the issue that I have the create Business logic file includes a code to get a value of display methods on the a from to determine which WF action should be visible .
 
I apply the same idea applied in standard PO Business logic file shown below but the return value is undefined Also I try to use the following : PurchReqTableApprovalApproveEnabledValue = data.getPropertyValue('WorkflowWorkItemTable/PurchReqTableApprovalApproveEnabled'); Also the value undefined the same code used to get another field value and it works , I am unable to find the missing I note that these display method are added to list page and I try to get their values in details page .
 
 
//////
 
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);}
 
 
 
 
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,014 Super User 2025 Season 2 on at
    Hi Maram,
     
    Are you aware that Microsoft announced the deprecation of the mobile workspace feature? Support ends in October this year. You can better invest in a Power App.
     
  • Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    The latest documentation indicates that mobile workspaces are being superseded or deprecated. Please check out the old thread: Finance and Operations (Dynamics 365) mobile workspaces. If you have problems creating a mobile workspace, you may consider another way to avoid investing too much.
    Best Regards,
    Hana

     
  • maram fraij Profile Picture
    on at
    Yes I know this It will be available until Oct, 2024  but it is already developed and I need to fix this issue 
  • André Arnaud de Calavon Profile Picture
    301,014 Super User 2025 Season 2 on at
    Hi Maram,
     
    Can you add some more information? What do you exactly mean by 'same idea applied in standard PO Business logic'? Where did you try what coding? I'm not able to imagine what you have done so far yourself.
  • maram fraij Profile Picture
    on at
    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);
     
  • André Arnaud de Calavon Profile Picture
    301,014 Super User 2025 Season 2 on at
    Hi Maram,

    In which class did you find the original coding? I can then try to verify what and when should happen. Or is it some java script at a particular place in the mobile workspace?
  • maram fraij Profile Picture
    on at
    Hi Andre, 
     
     
    This is a java script code applied in business logic the code is triggered in pageInit
     
     
     
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,014 Super User 2025 Season 2 on at
    Hi Maram,
     
    I tried to quickly recreate a mobile app from the purchase order approvals, but have a lot of issues to solve to make it suitable for requisitions. 
    When comparing your coding with the standard from the PO approval, I noticed one difference in variable naming. You start the PurchReqTableApproval variables with a capital, where the PO is using a lowercase for the first characters. Not sure if this would make a difference, but I know that variables are case-sensitive in java.
     
    Anyway, Microsoft announced this week that a preview for a new mobile approval app will be available in April. About two months later, they will be generally available. This approval app includes both POs and PRs. See also the release plan:
  • maram fraij Profile Picture
    on at
    Hi Andre,
     
    Once I change first character to lowercase it works . Thank you for your reply .
     
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 659 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 533 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 289 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans