- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 06:38 AM
Hi ,
I am trying to create a variable set that is visible only on sc_task, when the task is closed, it should pull the recurring price value mentioned when the catalog item is created (sc_cat_item). How to acieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2020 02:28 AM
Hi,
ok so in the run script after the task is complete the script is added
please find the below code
Ensure you add current.setWorkflow(false);
current.variables.recurring_price = current.cat_item.recurring_price.toString();
current.setWorkflow(false);
current.update();
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
05-26-2020 07:13 AM
Hi,
As far as I know variables/variable sets are only used at RITM level and not at SC_TASK level.
Can't you handle the recurring price value at RITM level including the variable set in the corresponding catalog item?
Regards:
Joaquín
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 07:19 AM
Hi, Thanks for response.
Yes. If it is not possible at sc_task level,We can do it at RITM level. Can you tell me how to get the recurring price value to one of the variable in variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 07:32 AM
Hi,
To include the variable set you just need to maintain the specific catalog item and add the variable set through its related list:
Anyway, recurring price something that is already available for each item and as long as price is not hidden, recurring price should be displayed as well:
If what you want to achieve is to have a RITM variable with the value of the recurring price then you can include the variable in your catalog item and assign recurring price value through a catalog client script.
Regards:
Joaquín
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 08:17 AM
Can you help me with the script?