Skip to main content

Notifications

Announcements

No record found.

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);}
 
 
 
 
  • maram fraij Profile Picture
    maram fraij on at
    mobile work space for workflow approval
    Hi Andre,
     
    Once I change first character to lowercase it works . Thank you for your reply .
     
     
     
     
  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,703 Super User 2024 Season 2 on at
    mobile work space for workflow approval
    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
    maram fraij on at
    mobile work space for workflow approval
    Hi Andre, 
     
     
    This is a java script code applied in business logic the code is triggered in pageInit
     
     
     
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,703 Super User 2024 Season 2 on at
    mobile work space for workflow approval
    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
    maram fraij on at
    mobile work space for workflow approval
    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
    André Arnaud de Cal... 291,703 Super User 2024 Season 2 on at
    mobile work space for workflow approval
    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
    maram fraij on at
    mobile work space for workflow approval
    Yes I know this It will be available until Oct, 2024  but it is already developed and I need to fix this issue 
  • Hana Xue Profile Picture
    Hana Xue Microsoft Employee on at
    mobile work space for workflow approval
    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

     
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,703 Super User 2024 Season 2 on at
    mobile work space for workflow approval
    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.
     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,703 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans