After Business rule not able to update all records in one session(Business rule gets terminated)

Nishant Kharat
Tera Contributor

Hi Team,

We are creating a sync between two tables. So if one table's record is updated then we need to update all corresponsding record in the second table.

So if there are more than 1lakh records which match with the record in 1st table and if the 1st table records gets updated the business rule runs but as it is a after BR it tries to update as many records it can but fails to update all 1lakh+records.

We cannot use a async BR here as we need to use previous object to get data.

please can anyone let us know, what could be the best solution to achieve this requirement?

 

Thanks,

Nishant kharat.

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Nishant Kharat 

BR will run per record and why it would update all records in another table?

It should update only particular record which has a relationship with the current record of Table A.

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

 

Thanks for your reply.

 

The issue here is , there may be any no of records which has relationship with current record of Table A.

So if current record is inserted or updated in Table A, the BR started updating corresponding records in Table B. Sometimes there are alot of records which is why the BR is getting terminated.

Also i tried calling a script include from BR and applied logic in script include but still it doesn't works.

It effects the performance of the instance.

 

please do let me know if there is any other solution for this.

 

Thanks,

Nishant.