Which table to apply the business rule on if you have to populate data into one from another

SW8
Tera Contributor

Hi All,

New to servicenow and business rules. 

We have two tables - primary and secondary. Based on the drop down value selected in primary field, I have to create a new or update existing record in the secondary table to show that field in the secondary table.

  1. Should I create the rule on the primary table in this case? 
  2. what would be the best way to get the values into the related fields in the secondary tables.. 

Thanks!

1 ACCEPTED SOLUTION

Rahul Dev1
Giga Expert

Hi,

Yes you can create Business rule on your Primary Table and in the script you can GlideRecord('Secondary Table') to create or update existing record in Secondary Table

View solution in original post

11 REPLIES 11

SW8
Tera Contributor

Also, I have created this business rule on the primary table as discussed. 

Hi, On last line try using newentry.insert() instead of newentry.update() Thanks Abhijit
By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP