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

I was pressed for time and found a work around by using the OOB jelly dialog_buttons_ok_cancel ui macro for the submit instead of the bootstrap buttons.



Thanks for the help.



<form class="form-horizontal">


  <div class="form-group">


  <label for="email" class="col-sm-3 control-label">* Email</label>


  <div class="col-sm-9">


  <input type="email" class="form-control" id="email" placeholder="Email Address"></input>


  </div>


  </div>


  <div class="form-group">


  <label for="phone" class="col-sm-3 control-label">Phone</label>


  <div class="col-sm-9">


  <input type="tel" class="form-control" id="phone" placeholder="Phone Number"></input>


  </div>


  </div>


  <!-- <div class="btn-group pull-right">


  <button type="cancel" class="btn btn-default">Cancel</button>


  <button type="done" class="btn btn-primary" onclick="return validateForm();">Done</button>


  </div> -->


  <div class='pull-right'>


  <j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


  <g:dialog_buttons_ok_cancel ok="return continueOK()" cancel="return continueCancel()" ok_type="button" cancel_type="button"/>


  </j:jelly>


  </div>


</form>