Request has been submitted screen - Record Producer

Tom Lapkowicz
Tera Expert

Hello.  I have a Record Producer that I want to kick off an Incident in some situations and a Request Item in other situations.  I believe that I have that part of it programmed and working.

 

My issue has to deal with what displays on the "your request has been submitted" screen once the form is completed.

 

If it is a scenario that is creating an Incident, the incident is created and the "your request has been submitted" screen displays as expected (see attached).

 

If it is a scenario that is creating a Request Item, the Request Item is created but the "your request has been submitted" screen says "record not found" (see attached).

 

I would like it to work that if it is a scenario that creates a Request Item that the "your request has been submitted" screen displays similar to how it does for Incidents.  Anyone have any ideas?  Thank you!

1 ACCEPTED SOLUTION

Hi @Tom Lapkowicz 
Use producer.portal_redirect if its for portal 

 

 

producer.portal_redirect = "/sp?id=order_status&table=sc_request&sys_id=" + requestSysId.toString();

//For your use case use the code as mentioned below
producer.portal_redirect = "/kb?id=ticket&is_new_order=true&table=sc_request&sys_id=' + requestSysId.toString();

 

 

View solution in original post

2 REPLIES 2

Tom Lapkowicz
Tera Expert

Additional information:

In the above, I said Request Item but I meant to say Request

 

When an item is submitted that kicks off an Incident, here is what the URL then looks like (this is correct): https://psecudev.service-now.com/kb?id=ticket&is_new_order=true&table=incident&sys_id=d953dfa31bf146...

 

When an item is submitted that kicks off a Request, here is what the URL looks like (this gives the "Record not found" message): https://psecudev.service-now.com/kb?id=form&is_new_order=true&table=incident&sys_id=undefined

 

I believe this is what the URL should look like when a Request is submitted: https://psecudev.service-now.com/kb?id=ticket&is_new_order=true&table=sc_request&sys_id=90045be31bf1...

 

I attempted to use producer.url_on_submit in my code (see below) to get this to work but no luck

 

    var requestSysId = request.insert(); // Insert the record and get its sys_id

    // Redirect to the Service Request details page

Hi @Tom Lapkowicz 
Use producer.portal_redirect if its for portal 

 

 

producer.portal_redirect = "/sp?id=order_status&table=sc_request&sys_id=" + requestSysId.toString();

//For your use case use the code as mentioned below
producer.portal_redirect = "/kb?id=ticket&is_new_order=true&table=sc_request&sys_id=' + requestSysId.toString();