Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Record producer in scoped application

Prateek07
Tera Contributor

Hi All,

 

I am trying to create a record producer in a scoped application. i am getting below error. How we can fix this?

"This is a wrong configuration for Record Producer"

 

Prateek07_0-1678711151234.png

 

 

2 REPLIES 2

SatyakiBose
Mega Sage

Hello @Prateek07 

Please refer to this KB article for solution:

Unable to create new Record Producers - Support and Troubleshooting - Now Support Portal

 

Also, you could try the below steps:

- Remove the variables having backend name same as of variable set, which will help resolve the error.

- Then copy the record producer.

After that you need to add the variable set (that was removed) to both your record producers.

 

This is the OOTB BR - is there anything in this which is stopping -

 

(function executeRule(current, previous /*null when async*/) {
var badData = false;
if (current.getRecordClassName() == 'sc_cat_item_producer' || current.getRecordClassName() == 'sc_cat_item_producer_service') {
if (!current.request_method.nil()) badData = true;
if (current.no_cart_v2.getValue() == 1) badData = true;
if (current.no_delivery_time_v2.getValue() == 1) badData = true;
if (current.no_quantity_v2.getValue() == 1) badData = true;
}
else if (current.getRecordClassName() == 'sc_cat_item_guide') {
if (current.no_wishlist_v2.getValue() == 1) badData = true;
if (current.no_quantity_v2.getValue() == 1) badData = true;
if (current.no_attachment_v2.getValue() == 1) badData = true;
if (current.mandatory_attachment.getValue() == 1) badData = true;
}

if (current.no_attachment_v2.getValue() == 1 && current.mandatory_attachment.getValue() == 1)
badData = true;

if (badData) {
current.setAbortAction(true);
gs.addErrorMessage(gs.getMessage("This is a wrong configuration for {0}", current.getClassDisplayValue()));
}

})(current, previous);