How to copy one record field value to another record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 07:28 AM
Hi everyone, I have a field called "Process Managers" which has a value by default, if I change the "default value" it will only change for the records that get created after this change, is there any way to make the other records get the value of the one that was created in last ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 07:30 AM - edited ‎11-02-2023 07:31 AM
You'll have to use a background script, or fix script to query the records and update from there.
var records = new GlideRecord('table_name');
records.addQuery('process_managers', '!=', 'oldValue');
records.query();
records.setValue('process_managers', 'newValue');
records.updateMultiple();
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 07:43 AM - edited ‎11-02-2023 07:44 AM
Hi @Peter Bodelier can this be done with a BR ? So that we dont need to do the background script everytime the default value changes.
Is there any way to get the default value of a field ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 07:46 AM
I don't think it's a good idea to create a Business Rule on the dictionary table.
I suppose it is possible, but I wouldn't do it.
At best create a scheduled script, which queries that dictionary field daily, and to your logic from there.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 08:55 AM
I will try the scheduled script