Record producer creating duplicated records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:01 PM
Hello Everyone,
I'm trying to create a normal change request from a Record Producer. When I do, it just create multiple records.
After many tests and validations I realized that Servicenow is creating one empty change request for each approver added based on approval definition. If the approval group has no members, it goes right to scheduled and do not duplicate records.
It shows the record gets duplicated at "Change moves to Assess" workflow step of Normal Change Workflow.
This is the record producer script:
current.short_description = "Change Request " + producer.cmdb_ci.name;
current.description = producer.description;
current.justification = producer.justification;
current.impact = producer.impact;
current.risk = producer.risk;
current.reason = producer.reason;
current.implementation_plan = producer.implementation_plan;
current.start_date = producer.planned_start_date;
current.end_date = producer.planned_end_date;
current.backout_plan = producer.backout_plan;
current.test_plan = producer.test_plan;
current.risk_impact_analysis = producer.risk_impact_analysis;
current.assignment_group = 'a158cd3fdb3f44d0f5cf32ffaa9619e4';
current.type = producer.type;
current.setAbortAction(true);
Any idea?!
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:08 PM
Hello Raphael,
Remove the last statement,"current.setAbortAction(true);". This is not required in a Record producer Script
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:13 PM
Thank you, but it's still duplicating.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:50 PM
When you create the new change record, are you using the standard table and workflow? Have you also, modified the flow??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:57 PM
Hi Abhinay,
Thank you for your reply!!
My record producer is using the Change_request table.
The workflow is the standard one. I did not changed it at all.