Business rule in mobile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 10:24 PM
Hi,
My business rule script in approval table is working only on desktop and it is not working in mobile....Does business rule run on mobile? If so then how to select both mobile and desktop options?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 10:43 PM
Hi,
Business rules runs on Server side and this can be triggered by both Desktop and Mobile UI
Thanks
Ayush
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 10:46 PM
HI Asha,
Business rules are server side code and should not be dependent on UI type. If you are having issue please share the code to look into.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 11:05 PM
Hi RaviKumar,
Thanks for your response.
When approval changes to rejected in approval form then rejection comments become mandatory. This is not working in mobile app
Business rule:
When: Before -update
Condition: Approval changes to rejected
(function executeRule(current, previous /*null when async*/) {
var notes = current.comments.getJournalEntry(-1);
if(notes == ''){
gs.addErrorMessage('Please enter comments on rejection');
current.setAbortAction(true);
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 11:08 PM
Hi Asha,
Add logs in the script to see if it is picking up notes and another log at the top to see if the business rule is firing. Then try to reject the approval on your mobile.
Please share your results thereafter.