redirect to "sysparm_ck" with "Not authorized" after submit on GlideDialogWindow

joshtessaro
Tera Contributor
  1. I am getting some strange behavior and I am out of ideas. I have a record producer with a ui page that has a button which opens a custom form to submit a related record type. After this ui_page popup is closed I would expect to be back on the original record producer.

Record Producer URL:

https://instance.service-now.com/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=2eb2d98...

I am rendering the UI page in a standard GlideDialogWindow on button click:

function openPopup(){

  var gDialog = new GlideDialogWindow("x_snc_vms_new_guest_popup");

  gDialog.setTitle("New Guest");

  gDialog.setSize(500,500);

  gDialog.render();

}

After submit the new record is created with a GlideAjax call then the UI page runs out of code, it does not matter whether I use GlideDialogWindow.get().destroy(); or not, I get a very brief flash of the record I should end up on then get redirected to the following url which displays Not authorized.

https://instance.service-now.com/com.glideapp.servicecatalog_cat_item_view.do?sysparm_ck=be6bd1914f4...

Any help or thoughts on what to check would be appreciated.

Note: This is in a scoped app if it makes a difference.

Edit: It looks like I am getting the following two evaluater errors after submitting the ui_page:

1 ACCEPTED SOLUTION

If the error message is coming from an OOTB version, then it sounds like a call to customer support is in order.


View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Josh,



You may find the below blog helpful.


Getting your ServiceNow URLs right


Chuck Tomasi
Tera Patron

It would appear that the


var item = GlideappCatalogItem.get(jelly.sysparm_id);


has failed so the next line is saying "Hey, that's null. What are you doing?" Any chance of verifying jelly.sysparm_id is correct and item is a valid object before stepping in to the next line of code?


Thanks for the quick response!



The code in the error message is from the OOB version of the com.glideapp.servicecatalog_cat_item_view sys_ui_page, additionally I am not manually doing anything with URLs or redirects at this point. I was expecting the popup to just go away when complete leaving the page behind it.


If the error message is coming from an OOTB version, then it sounds like a call to customer support is in order.