Add Save button in record forms

vince591
Mega Contributor

A few years ago, a course instructor (can't remember if it was for development or administration) showed us how to add Save as a command button besides Update and Delete.  When working with record forms, the Save action is accessible only by right-clicking in header panel, or clicking the context menu (hamburger bun).  

Unfortunately, after all this time,  I can't remember how to do it.

For anybody who has used ServiceNow for at least 5 years, this question is for you.

Thanks in advance.

1 ACCEPTED SOLUTION

Tomko
Tera Expert

On your UI action, check "Form button".

View solution in original post

9 REPLIES 9

Utpal Dutta1
Mega Guru

Hey Vince,

Yes you can achieve it very easily by creating an UI action. Just navigate to UI Actions module. You can find it under System UI

 

  1. Click on new
  2. Now give a name to your UI action. Such as Save or Save as Draft.
  3. Select the table on which you want to apply this UI action. Such as Incident or Problem.
  4. Now give an Action name (sysverb_insert)
  5. Now to display this UI action in your Hamburger menu or Banner Menu just select the Form Context Menu along with List Context Menu (Checkbox) to right hand side.
  6. Now write a code to save the current record on the form.

 

Script:

answer = current.insert();
gs.include('ActionUtils');
var au = new ActionUtils();
au.postInsert(current);
action.setRedirectURL(current);

 

Horray!!! You're done. Go check it out.

 

But before that please mark my answer Helpful as well as Correct.

 

Thanks and Regards:

Utpal Dutta

 

 

Thanks Utpal,

This is quite a bit of detail.  I might tweak it for customization.

Hey Vince,

If i was able to answer your query then please mark my answer Correct as well.

 

Thanks:

Utpal Dutta

Tomko
Tera Expert

On your UI action, check "Form button".