Challenge in UpdateMultiple() method.

Mohsin2
Tera Contributor

Hi All,

I am using UpdateMultiple() method in UI action for bulk updation(10 to 15 k records) and this method is taking near about 5 min to update all the records, but this updation process is running in background(Async) and this UpdateMultiple()  method is immediately giving control to next line of the script so the next line is getting executed immediately after the UpdateMultiple() method.

But the next execution line should be wait till the UpdateMultiple() method completely update all the records (10 to 15K), so please guide how can I process further. (Just want to highlight that we are developing a scope application)

 

Thanks

Regards,

Mohsin

8 REPLIES 8

Hi Ankur,

Thanks for your input, but if go with the said approach we will face same issue/challenge as the nextActivties() Function will get called immediately next to updateMultile() Function.

 

As per our requirement the nextActivites() function should get call when all the bulk updation is done.

 

Note:- UpdateMultiple() method is running asynchronously but we want it should be act as a synchronous without affecting the performance. 

Hi,

then use updateRecord() within while loop and don't use updateMultiple() and then call the function

As per my understanding that's the only way

Regards
Ankur

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

Thanks Ankur,

Initially we tried with while loop along with updateRecord, but the loop will get executed multiple time depending upon the bulk count (10k)  and we were facing performance issue. therefore we are using updateMultiple() method.

Okay but I don't think any other option

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