- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 03:44 AM
Hi I am using below code in one of my BR to check the update condition on task. below is the code which I am using but when I put logs i see that if condition was not matched.
!current.cat_item.u_partner_correlation_id.nil() && gs.getSession().isInteractive()&& current.cat_item.u_partner_name =='XYZ'
I am suspecting it might be due to gs.getSession().isInteractive(). Can you help me with correcting the condition ?
Thanks
Rohan
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 03:48 AM
Hi,
You can just log all three in the script part of the BR and remove it from condition to test.
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 03:48 AM
Hi,
as per your BR condition it would only run for interactive sessions and not when something gets inserted/updated from API
are you testing from API or from UI?
Did you check by removing one by one which condition is failing
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 03:58 AM
Hi Ankur,
we are testing from the UI and I just tested removing the entire condition and BR RAN on update but I will try removing one by one and I can check which one is failing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 04:04 AM
Hi,
Sure keep posted.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 04:18 AM
Hi Ankur,
Thanks for your suggestion actually the issue was with current.cat_item condition BR is on sc_task so this had to be dot walked.
Regards,
Rohan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 04:33 AM
Nice to hear.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader