Condition to Check for Item's Category on Approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 06:00 AM
Hi All,
I have a scheduled job that runs daily to issue approval reminders for outstanding requested item approvals. I now want to split this job to issue one email notification for item's under Hardware category and other for all others.
The issue is that I can't seem to add a correct query to find outstanding approval for requested items where item's category is Hardware.
Queries that I tried and they did not work:
- appr.addQuery('sysapproval.ref_sc_req_item.cat_item.category.sys_id', 'e29b2cba0f594200a17bdd44e2050ef6');
- appr.addQuery('sysapproval.ref_sc_req_item.cat_item.category', 'e29b2cba0f594200a17bdd44e2050ef6');
- appr.addQuery('sysapproval.ref_sc_req_item.cat_item.category', 'Hardware');
Does anyone have any thoughts on what I'm missing here?
Thank you!!
Kamile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 06:12 AM
declare a variable called cat, it will make it ease
var cat= sysapproval.cat_item.category.title;
- appr.addQuery(cat,"Hardware");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 06:25 AM
Unfortunately this solution does not work..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 06:19 AM
Hi Kamile, Just modifying your 2nd option as below. This should work. Let me know.
appr.addQuery('sysapproval.cat_item.category', 'e29b2cba0f594200a17bdd44e2050ef6');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 06:26 AM
Hi Sumeet - sadly this did not work..