Records not getting updated in List View
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 11:34 AM
Currently , I have worked on a development where if service owner or service owner group has been changed on mapped application service table, It needs to be automatically updated in all the related incidents.
Issue is like only few records were seen getting updated on table list view not all.
Thanks. Below is the code for the BR I have used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 12:19 PM
@sushantmalsure it is an After update business rule, Screenshot which I have attached is after commenting out Setworkflow(false) from the code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 12:30 PM
So you mean update of 'u_service_owner ' and 'u_service_owner_group' is still not happening?
Can you share the condition of BR when these fields needs to be updated and when BR gets executed?
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 12:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 12:46 PM
and what is there in script section of this BR?
you are running the BR when values in these field changes and in script you are changing the value of same fields?
Have this BR on Application Service table with conditions as
var gr = new GlideRecord('incident');
gr.addQuery('cmdb_ci', current.sys_id);
gr.query();
while (gr.next()) {
gr.u_service_owner = current.managed_by;
gr.u_service_owner_group = current.u_service_owner_group;
gr.update();
}
Do check u_service_owner and u_service_owner_group field on incident are reference field same as the ones you are getting from.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 01:05 PM
@sushantmalsure I have verified these are same fields, referring to Service owner and service owner group on cmdb_ci_service_discovered table. We are not updating the same fields here if the service owner and service owner group are changed on cmdb_ci_service_discovered we are updating related incidents having this configuration item with the new values of service owner and service owner group.