Request (sc_request) short description update as catalog name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2022 04:48 AM
My requirement was for a particular category items the request short description should be same as the catalog item name.
so i wrote a simple business rule on ritm below
Now i don't know what's wrong in it but i am getting rowcount 0 and as well the script doesn't enter inside the loop.
Regards,
Debasis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2022 06:54 AM
Hi
you created after business rule on sc_req_item table is that correct?
If Yes check request field on RITM table whether it has request or not?
Once it is triggering conditions and going to script then you need to check or debug in the script.
Try to use same script which I gave above and replace with your field names.
if there is any type error it will not work.
Regards
Pavankumar
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2022 07:44 AM
Hi
you can use after insert BR on RITM table and use this script
I hope your BR condition is correct and considering BR triggers the below script I shared will work fine
(function executeRule(current, previous /*null when async*/ ) {
var req = current.request.getRefRecord();
req.short_description = current.cat_item.getDisplayValue();
req.update();
})(current, previous);
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
09-18-2022 08:17 PM
Hi
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
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
09-22-2022 08:13 AM
Hi
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
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
09-21-2022 07:42 AM
Hi
If it is resolved please close the thread by Marking as ✅ Correct so that other readers will get benefit if they have similar question.
In future they will refer this one get benefited or let us know if still not resolved.
Hope you understood.
Regards
Pavankumar
ServiceNow Community MVP 2024.
Thanks,
Pavankumar