Universal request - Contact type getting set to "Self-service - Universal Request"

Shivani A
Tera Contributor

Hi,

I have a custom record producer that creates a record in the Universal Request table, and I am also testing with the out-of-box Request Help record producer. I am trying to set the Contact Type to “Self-service” in the producer script, but when the record producer is submitted, it always gets set to “Self-service – Universal Request” (ur_record_producer).

Where and how is this value being set? Is it possible to modify this behavior?

I am new to Universal Request, so I am not aware if there is any specific configuration for this.

 

I have already checked the business rules and scripts on the Universal Request (UR) table, as well as the ones on the OOB record producer and found nothing that sets the contact type.

I am testing this in a fresh PDI.

10 REPLIES 10

Ankur Bawiskar
Tera Patron

@Shivani A 

Any before insert business rule is setting the value?

what debugging did you do from your side?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

No, it doesn’t seem to. I have already checked the business rules

@Shivani A 

any assignment rule is setting that field if not BR?

you didn't share the script

If you are setting wrong choice value in script then it won't work

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

I checked, and there are no assignment rules setting this. I’ve also attached a screenshot of the script as well. I only added that one line

Here:

current.needs_resolution_review = true;
current.contact_type = 'self-service';
if (producer.department) {
var serviceSetAssignmentGroupGR = new GlideRecord("universal_request_service_set_assignment_group");
serviceSetAssignmentGroupGR.addQuery("service_set", producer.department);
serviceSetAssignmentGroupGR.query();
if (serviceSetAssignmentGroupGR.next())
current.assignment_group = serviceSetAssignmentGroupGR.getValue("assignment_group");
}
if (!gs.isMobile()) {
var portalRedirectURL = "?id=standard_ticket&table=universal_request&sys_id=" + current.getUniqueValue();
producer.portal_redirect = portalRedirectURL;
}