Issue with Excessive Fields on Target Record When Submitting Record Producer via Script

Olga Ostashova
Tera Contributor

Hi ServiceNow Community,

I’m seeking some help regarding an issue I’ve encountered while programmatically creating target records using a Record Producer through a backend script.

I’m using the sn_sc.CatItem.submitProducer(obj) method to submit the Record Producer. The obj I’m passing includes the necessary variables and the sysparm_id of the Record Producer, as outlined in the official API documentation.

The submission process works — the target record is created, and the fields are populated as expected. However, I’ve noticed that the resulting record contains an unusually large number of fields, many of which are not relevant to the specific Record Producer. Because of this, the record ends up being quite large and takes a significant amount of time to load.

Has anyone else experienced this behavior? I’d appreciate any insights or suggestions on how to resolve or optimize this.

Thanks in advance for your help!

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Olga Ostashova 

which unwanted fields are you referring?

share your complete script which you are using along with screenshots

There will be some system fields which gets set when you insert a record such as 'sys_created_on', 'sys_created_by', 'sys_updated_on', 'sys_updated_by'

Are you sure no other before insert or after insert business rule is populating the other set of fields?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader