Record producer creating duplicated records

raphaelm2
Tera Contributor

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?!

6 REPLIES 6

Harish KM
Kilo Patron
Kilo Patron

Hi I dont think the issue is with record producer script. You might need to check workflow and scripts on approval tables, change request table to see if there is a script which inserts new records

Regards
Harish

It's indeed an issue with the Change Request workflows.