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.

Update the field value from application table too related relationship table

Shalika
Tera Expert

I have application table which has a field 'Domain' of List type. For the application table record, I have many downstream relationships as below -

Shalika_0-1707122524507.png

These records also have 'Domain' field. Now I want that if the 'Domain' field is updated in the application table the same should also get reflected in all the reocrds which are in downstream relationship. How can I do this

4 REPLIES 4

VaishnaviShinde
Kilo Sage

Hello @Shalika ,

 

You can create BR on application table and add the condition Domain changes. Add below script 

 

var problem= new GlideRecord('problem'); // Add your table name
	problem.addQuery('first_reported_by_task',current.getUniqueValue()); // Queried the record with your common field 
	problem.query();
	while(problem.next()){
		problem.watch_list = current.watch_list; // Add your field name
		problem.update();
	}

 

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Vaishnavi Shinde

 

do I need to query the relationship table also?

Is that relationship is custom or OOB?

 

custom relationship, so will I have to gliderecord relationship table also