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

Dave65
Tera Contributor

Is there any prayer that ServiceNow will ever actually document all of their functions?

It is really time consuming to dig into these functions that they use in their own code to figure out what their code is doing.

I am working through their Scripting a UI Action training and they use functions that they do not tell you what they do and there is no documentation for. gsftSubmit is just 1 example.

My appologies, I know I am preaching to the choir.

 

Hav a Great day!

Hi Dave,

There are many functions and classes which are not documented but are widely used..!!

Regards
Ankur

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

Mayu
Tera Guru
Tera Guru

This function is used to run ui action client and server side.

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.

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 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.