- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2020 03:32 AM
Hello everyone,
I need to know how to copy fields from an Interaction to any related Record created with the "New" button of Related Record in the interaction record.
I don't know what type of / BR / UI script action I need to use.
There is a UI action that allows me to create a related incident and copy these fields, but it doesn't work using the "New" button in related task.
This UI action is:
Name: "Create Incident"
Condition: new GlideRecord ("incident"). CanCreate ()
Script:
if (current.update ()) {
var inc = new GlideRecord ("incident");
inc.initialize ();
inc.caller_id = current.opened_for;
inc.short_description = current.short_description;
action.openGlideRecord (inc);
}
I need something like this but working with the Related Task button or its Interceptor.
Any idea?
Thanks in advance.
Rodrigo.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2020 11:42 PM
Hi,
Finally I found a solution.
I had created a new BR.
"
var Inter = new GlideRecord('interaction');
Inter.addQuery('sys_id', current.parent_interaction);
Inter.query();
if (Inter.next()) {
current.requested_for = Inter.opened_for;
}
"
Thanks.
Rodrigo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2020 09:14 AM
Hi Rodrigo,
You can refer to this article, passing variable from interaction any type of record
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Cuong Phan
DXC Consultant.
Cuong Phan
ServiceNow Technical Lead
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2020 11:42 PM
Hi,
Finally I found a solution.
I had created a new BR.
"
var Inter = new GlideRecord('interaction');
Inter.addQuery('sys_id', current.parent_interaction);
Inter.query();
if (Inter.next()) {
current.requested_for = Inter.opened_for;
}
"
Thanks.
Rodrigo.
