How to create record in custom table when a record is created and updated in other custom table?

karishma shaik
Tera Contributor

Hi , 

 

I have a Business Requirement ,where - 'If a record gets inserted / Updated in a custom table then same respective record should be created / updated in another custom table'. What script needs to be used in this type of scenario 's.

 

Please Help me on this

5 REPLIES 5

Shalini32
Kilo Guru
Kilo Guru

Hi

 

You can create One business rule on the one custom table - 

Type - After

Check Insert and Update

Script - 

var custom2 = new GlideRecord("<2nd table name>");

custom2.initailize();

<Map the data as per the requirement>

custom2.insert();

 

Thanks,

Shalini

 

Please mark it helpful if solution worked for you