Does 'gsftSubmit' work the same as GlideAjax?

bonsai
Mega Sage

This is my first time using 'gsftSubmit'.

 

Until now, I have used 'GlideAjax' to execute server-side processing from the client.

 

However, I would like to use 'gsftSubmit' from now on if it can be handled with a single UI action.

 

Even after looking at the documentation below, I don't understand if this function is asynchronous processing.

 

Can anyone explain how it works in detail?

 

 

https://www.servicenow.com/docs/bundle/utah-application-development/page/script/useful-scripts/refer...

 

The requirement is to create a UI action that will be processed only when the user responds with ok to the popup.

I'm thinking of running the process on the server side!

 

1 ACCEPTED SOLUTION

Voona Rohila
Mega Patron
Mega Patron

Hi @bonsai 

If you just need a simple confirmation with the user using details available on client side(Which can be accessible with g_form methods ) then gsft is sufficient.

Example - Propose Solution Button which Checks if user filled resolution codes/notes and submit action only if filled. 

 

However, if user clicks a button but you want to get additional details from server side before submitting the action then you need  to make a GideAjax call to get the info from the server before proceeding with submission.

 

Example - Resolve Incident Button which Checks if all the Incident tasks are complete(We have to make GlideAjax call here) and resolve the incident if Incident tasks are resolved.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

View solution in original post

2 REPLIES 2

Voona Rohila
Mega Patron
Mega Patron

Hi @bonsai 

If you just need a simple confirmation with the user using details available on client side(Which can be accessible with g_form methods ) then gsft is sufficient.

Example - Propose Solution Button which Checks if user filled resolution codes/notes and submit action only if filled. 

 

However, if user clicks a button but you want to get additional details from server side before submitting the action then you need  to make a GideAjax call to get the info from the server before proceeding with submission.

 

Example - Resolve Incident Button which Checks if all the Incident tasks are complete(We have to make GlideAjax call here) and resolve the incident if Incident tasks are resolved.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Voona Rohila
Mega Patron
Mega Patron

For your requirement, You need client UI Action with Confirm method and gsft to submit the Server code.

You will not require a GlideAjax call in this case.

 

Sample Logic: refer this link for complete details https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/script/useful-scripts/reference/usi...

 

VoonaRohila_0-1738865784820.png

 

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP