How to update the relationship ci's

Arun91
Tera Contributor

Hi,

I have created a field in cmdb_ci_win_server table. In business application table we have ootb field called emergency tier. If i select the value in the emergency tier field in business application table then the same value should update it in the relationship which was created for the business application.

For example: A is the business application record

B is the cmdb_ci_win_server record. I have created the relationship for A runs on B. I have selected the emergency tier for A record then the same value that needs to be updated in B record.

Anyone help me on this.

5 REPLIES 5

Mark Manders
Mega Patron

You can create a flow for this. If emergency tier changes, find all cmdb_rel_ci records where trigger record is parent or child (depending on how far you want to go and what directions you have created. For each of these records find the other one (based on if it's parent or child) and update those records to the same emergency tier. Make sure you have all conditions set correctly, because updating the next record, can trigger the same for the next. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Can we do it through business rules

Yes, but it would be scripting instead of just dragging and dropping. The way it would work is the same.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Ok is there any sample script do you have?

I have tried it but it is not working for multiple record