Change/Update a field's value(name) in the records from a particular custom table across instances

Keerthan S
Tera Contributor

Below is the function I used in my script.

I need to replace the display names for LoBs from 'AJ' to 'ABD' and from 'BS' to 'HM' from one custom

_getLob: function(source) {
var arrayutil = new global.ArrayUtil();
//list of LoBs with their sources
var a = ['agaf'];
var b = ['mas', 'shshh'];
var c = ['8s', 'mi', 'mnt'];
var dc = ["ks"];
//Array of LoBs with their names
var arrayOfLobs = [['AJ', a], ['BS', b], ['CF', c], ['CM', dc]];

 

I need to replace the display names for LoBs from 'AJ' to 'ABD' and from 'BS' to 'HM' from one custom table:"u_per_source_example"

 

The record insertion to the table will be on a daily basis.
LoB names needs to be updated for all the previous LoB records and also for future insertion of records in the 'u_per_source_example' table.

note: in the code we can just replace it and thinking it might work from tomorrow records as the new insertions will be done.

But I need to update previous records in that table for one particular field 'LoB'.
(from  'AJ' to 'ABD', 
'AJ' LoB has nearly 6000 records in lower instance, around 8000 records in higher instance)
Can we do this through fix script?

 

Can anyone give me exact procedure to update previous records and how I can implement across different instances

5 REPLIES 5

Interate 10-20 times to set a limit of records to be updated as per query and then you will have no performance issue as it will be done in batches.