- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2015 06:54 PM
Hi folks - I know there are some specific synchronisations set up for fields when an Asset record is updated, that will push these through to the related Config Item. I'd like to add a field to that sync (both from Asset > CI, and CI > Asset.
On both tables/forms I have a field called u_device_type with the same list of choices. What can I do to make sure that when someone updates the Asset or CI, the change is reflected in the related CI or Asset record?
Thanks,
-Adam
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2015 11:50 PM
Hi Adam,
What about a business rule per table that would run after an update?
Regards,
Sergiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2015 11:50 PM
Hi Adam,
What about a business rule per table that would run after an update?
Regards,
Sergiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2015 12:04 AM
Thanks Sergiu,
What's the easiest way to get my newly created rules to apply to the items I already have in the system? Do I need a script that will go through and perform the action? I'd rather not have to go through and update every record - I'm sure there's an easier way, I'm just a bit simple
Essentially, I have a few thousand records that need to be updated, that already exist. The business rule will address any new items, any thoughts on the existing?
Cheers,
-Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2015 12:43 AM
Hi Adam,
Essentially, if you want to apply the content of your new business rule to the existing records, why then not run the script via background scripts to update all existing records? This should be done before deploying the new business rule, otherwise you might get duplicate updates and you don't want that.
Something like for example:
var gr = new GlideRecord('incident');
gr.query();
while (gr.next()){
// here comes the content of your business rule
......
//don't forget to finally update the record
gr.update();
}
You will need to test this on a subproduction instance and verify that results are the ones you expect.
Regards,
Sergiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2015 12:02 AM
Hi Adam,
There are two OOTB Business Rules : "Update Asset fields on change" and "Update CI fields on change" which use "AssetAndCISynchronizer" class to synchronize Assets and CIs.
You can modify this script include (not recommended) or create your own business rules.