Possibly to disable submit UI Action

BartFrelian1337
Tera Contributor

Hi There!

 

I am working on a interesting use case that i am not able to figure out.

I basically have created new custom scoped application that has two tables.

- Purchase Request (Parent Table)

- Line Item (Child Table)

Line Items are configured to be related list for Purchase Request however my goal that i am aiming for is to allow people submitting Line Items all together with initial submission of Purchase Request. I did some digging and found that due to the nature of the relationship i am not able to display related list before initially submitting the parent record. I can live with that. I was thinking of a workaround where users submit the record first then create child line items however.... There is the out of the box SUBMIT UI Action that is a problem. We know that it's nature is to submit the record and move user back to the list view. I would want to avoid that experience so ideally i would want to replace the SUBMIT UI Action with my custom UI Action that i could call "Submit Draft" that will only save current record. This way users would save the parent while staying in the record they created. However in the Studio i dont see any record of UI Actions. I went to the Main Application: System UI > UI Actions to modify the visibility of the submit button and potentially make it not visible at all to be replaced by my custom UI Action but i am not able to see ANY out of the box core sytem UI Actions for my custom application. Is this because it is a Scoped app? At the moment i am blocked and not really sure how to proceed further to disable that experience of being moved out of the record back to the list view post submission. Will be thankful for any suggestion guys! Thanks!

1 ACCEPTED SOLUTION

Murthy Ch
Giga Sage

Hello @BartFrelian1337 

I tried like this in my PDI and it worked but I'm not sure if there is any other better approach.

Created a new UI action in scoped application with same name "Submit" and Override with Global "Submit" UI action with action name "sysverb_insert" like below:

MurthyCh_0-1741570461975.png
Let me know if this helps for you

 

Thanks,
Murthy

View solution in original post

6 REPLIES 6

Murthy Ch
Giga Sage

Hello @BartFrelian1337 

I tried like this in my PDI and it worked but I'm not sure if there is any other better approach.

Created a new UI action in scoped application with same name "Submit" and Override with Global "Submit" UI action with action name "sysverb_insert" like below:

MurthyCh_0-1741570461975.png
Let me know if this helps for you

 

Thanks,
Murthy

Thank you! I am not able to find the Submit default UI Action to be replaced on the pick-list when i query by the name of the custom table however i created this UI Action as by your screenshot with the 'Overwrite' option blank not selected and i see it replaces the default submit :). Probably because of the action name == sysverb_insert.

 

I have one last step to cover that doesnt work so far. Even if the script contains:

current.insert();
action.setRedirectionURL(current);
 
The system still moves me back to list view. Possibly because of the insert() function that takes executor back to the list view. What i am looking for is to force stay on the record post submit.

This worked for me. Thanks! With the only twist that i couldn't select out of the box submit ui action on the Overwrite selection however naming the UI Action sysverb_insert did the trick and actually replaced the default UI Action. Thank you for you help!

Ankur Bawiskar
Tera Patron
Tera Patron

@BartFrelian1337 

you can override the UI action

what did you try so far and what didn't work?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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