- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2020 12:51 AM
Hi All,
How to populate Request Company field in Requested item and catalog task. I have added run script core activity in workflow to populate request company field. So the same company is to populate in both requested item and catalog task.
Regards,
Sruthi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2020 12:06 AM
Hi Sruthi,
please add these 2 lines in each catalog task activity advanced script section for whichever task you want it to be populated
var company = current.request.company;
task.<companyField> = company;
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
06-04-2020 05:52 AM
Hi Sruthi,
you can use the same run script activity to update for RITM
For making it populate on Catalog Task you can use the advanced script section when you use the catalog task activity in workflow
Ensure you give valid field name of company present on RITM and SC Task table
//For RITM
var ritm = new GlideRecord('sc_req_item');
ritm.get(current.sys_id);
ritm.<companyField> = ritm.request.company;
ritm.update();
Catalog Task
//For Task to be used in catalog task activity advanced script
var company = current.request.company;
task.<companyField> = company;
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
06-11-2020 09:49 PM
Hi Ankur,
Thanks Ankur!
It's working now for RITM Company field.
But I have used Switch activity in some of the workflow. In that Requested item company is populating same as request. But task company field is not populating.
For below task company is not populating
Regards,
Sruthi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2020 12:06 AM
Hi Sruthi,
please add these 2 lines in each catalog task activity advanced script section for whichever task you want it to be populated
var company = current.request.company;
task.<companyField> = company;
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
06-13-2020 01:11 AM
Let me know if that answered your question.
If so, please mark my response as ✅ correct & 👍 helpful so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
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
07-03-2020 02:22 AM
Hope you are doing good.
Let me know if that answered your question.
If so, please mark my response as ✅ correct & 👍 helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader