- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2018 06:51 AM
Hi All,
I want to copy the variables present in the variable editor of Req Item Form to Catalog TASK fields.
How Can I achieve?
Regards,
Ajay.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2018 07:08 AM
Then you can write OnBefore BR - Insert on Catalog Task. But this will always run whenever the new Task is getting created or you can set the specific item in the condition
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.requested_item); //RITM sys_id
gr.query();
while(gr.next()){
current.description = gr.variables.variable_name;
current.description += gr.variables.variable_name;
current.update();
}
Thanks
Shashikant
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2018 06:55 AM
Hi Ajay,
I assume you are creating it from workflow in workflow for catalog task activity you can use the slush bucket and move the variables you want to be shown on catalog task.
Mark Correct if this solves your issue and also hit Like and 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
‎07-03-2018 07:02 AM
Thanks for the Reply.
I dont want to update it via workflow. Because it is not specific to one workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2018 06:57 AM
You can add the script under the Catalog Task Advance Script OR you can add the variables using sluch bucket, but that will show the variables on the task form
task.description = 'What is the Business Unit? '+current.variables.business_unit+'\n';
task.description += 'Name of the Company? '+current.variables.name+'\n';
task.description += 'What is the Contact ID? '+current.variables.contact_id+'\n';
Thanks
Shashikant
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2018 07:02 AM
Thanks for the Reply.
I dont want to update it via workflow. Because it is not specific to one workflow.