What is gsftSubmit()'s param??

senon
Tera Sage

Hello, expert.
I am currently investigating the function gsftSubmit().
I found out that this function is used in UI actions and it is a function that executes the UI action server side again within the UI action.

However, I don't understand why this function has the 1st parameter "null" and the 2nd parameter g_form.getFormElement().

Please let me know the meaning of these parameters.

Best regards.

senon

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@senon 

refer below link for explanation

Client & Server Code in One UI Action

UI Actions includes

Regards
Ankur

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

View solution in original post

Muhammad Harixs
Tera Expert

null (First Parameter):

This parameter represents the parent HTML element to which the notification will be appended. When set to null, it typically means that the notification will be appended to the global notification container, which is often located at the top of the page.

g_form.getFormElement() (Second Parameter):

g_form.getFormElement() is the out-of-the-box method. It is used to retrieve the DOM (Document Object Model) element of the current form. In the context of a UI action, this is likely being used to specify where the notification should be attached within the form.

UI Action Name (Third Parameter):

The third parameter is the name of the UI action itself. This is used as an identifier for the UI action and is often included in the message or title of the notification to provide context about which action triggered the notification.

View solution in original post

9 REPLIES 9

Tony Chatfield1
Kilo Patron

Hi, I belive that it's undocumented but some detail in this post courtesy of Chuck

https://community.servicenow.com/community?id=community_question&sys_id=d2d58b21db1cdbc01dcaf3231f961921

Thanks for replying, Tony.
I have seen that question once though.

Chuck's answer didn't tell me why gsftSubmit() would have null or g_form.getFormElement().

Ankur Bawiskar
Tera Patron
Tera Patron

@senon 

refer below link for explanation

Client & Server Code in One UI Action

UI Actions includes

Regards
Ankur

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

Mayu
Tera Guru
Tera Guru

Hi,

gsftsubmit() function is the out of the box function.gsftsubmit called the server side code. It called another ui action into current ui action.

gsftSubmit(null,'g_form.getFormElement','ui action name');

Third parameter is Ui action name it called ui action.

 Please Mark helpful or correct .