UI Page processing script not executing from GlideDialogWindow


Since Madrid, when submitting a UI Page called from a GlideDialogWindow that contains a reference field picker, onSubmit, the instance redirects to the UI Page itself instead of executing the "Processing script" logic on the page.

The processing script can be triggered by wrapping the UI Page's HTML form elements in a <g:ui_form> tag. Since the redirect is handled by the processing script, this also prevents the post-submittal redirect to the UI Page. 

Ref.: https://docs.servicenow.com/bundle/madrid-application-development/page/script/server-scripting/reference/r_UIPages.html#conceptlmqqchy4

Steps to Reproduce

1. Import the attached UI Page (lcg_test) and the UI Action (Test UI Page Action) XML files.
2. Navigate to any incident record and click the 'Test UI Page Action' button.
3. Select an incident from the reference picker and submit.

The Processing Script is not called. Redirection takes the user to a standalone UI Page for the lcg_test, instead of the original incident record.


This is expected behavior and by design in all currently supported releases. Since security fixes in Madrid, the form is being submitted with a GET action, so the processing script is not executed.

As a workaround, use g:ui_form instead of the standard HTML form element, for example:

<form action=“ui_page_process.do”></form>


Related Problem: PRB1345774