- 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 11:05 PM
Still not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 11:25 PM
Hi,
Are you saying you want to update that variable value from script?
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
05-26-2020 11:50 PM
Yes, i need the variable value to be populated in sctask and the value should be the recurring price of the item. Both are not hapenning
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2020 11:57 PM
Hi,
please check script shared below; Ensure you place it in BR of sc_task
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
05-27-2020 12:28 AM
I didnt get you. As mentioned above i am trying it from workflow with below script. What changes are you suggesting?
current.variables.recurring_price = current.cat_item.recurring_price.toString();