Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Changes done on list view should affect to things related to the record

Arjun Reddy Yer
Mega Sage

Required help @Vasantharajan N @Ankur Bawiskar @Voona Rohila @WillieW 

 

When changes are done on list view that should reflect to things (attached records) related to the record. 

List View:

 

ArjunReddyYer_0-1765215435759.png

 

Related Records:

In the below mentioned related records Impact & Priority needs to be change when Impact & Priority cahnged on list view

 

ArjunReddyYer_1-1765215599121.png

 

1 ACCEPTED SOLUTION

Add BR Trigger conditions properly something like - impact changes || priority changes

 

Refer sample logic below:

//sample logic
var grST = new GlideRecord('child table') // childtablename
grST.addQuery('parent',current.sys_id); // add your related list condition, added parent as example.
grST.query();
while(grST.next())
{
grST.priority = current.priority // map directly if backend values are same else do an if check and map it.
grST.impact = current.impact //map directly if backend values are same else do an if check and map it.
grST.update();

]

 

There are so many similar ootb functionalities( Incident to Incident task, Change to Change Task), you can take a look in your instance.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

View solution in original post

5 REPLIES 5

Add BR Trigger conditions properly something like - impact changes || priority changes

 

Refer sample logic below:

//sample logic
var grST = new GlideRecord('child table') // childtablename
grST.addQuery('parent',current.sys_id); // add your related list condition, added parent as example.
grST.query();
while(grST.next())
{
grST.priority = current.priority // map directly if backend values are same else do an if check and map it.
grST.impact = current.impact //map directly if backend values are same else do an if check and map it.
grST.update();

]

 

There are so many similar ootb functionalities( Incident to Incident task, Change to Change Task), you can take a look in your instance.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP