Declarative Action or workspace Script : Force Save the form bypassing Mandatory fields

Kachu
Mega Sage

We have a requirement where certain role user should be able to save the form bypassing the mandatory fields  on injury illness record.I have created Ui action with script 
"action.setRedirectURL(current);
current.update();" 
this is working  when i used "sysverb_cancel" as Action name and its working only on Instance side. Client needs this to work on te Workspace side. Can any one help me or provide sample script i can use either in workspace client script or Declarative action where i can save the records bypassing the mandatory fields. Thank You.

3 REPLIES 3

Tanushree Maiti
Giga Patron

Hi @Kachu ,

Allowing users to save records without completing mandatory fields is not considered a good practice.

ServiceNow provides OOB Save button with a defined purpose, and bypassing mandatory field validations goes against the intended system behavior.

 

Still if you are looking for the change:

https://www.servicenow.com/community/developer-forum/save-button-on-form-to-ignore-mandatory-fields-...

https://www.servicenow.com/community/developer-forum/save-form-and-bypass-required-fields/m-p/254932...

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

@Tanushree Maiti  I agree that its not good practice but for my client scenario is different and also this is required for certain roles only for emeergency request. the Links you have provided i have already tried it. As mentioned it works in instance side but not in workspace.I need specific for workspace  i.e declarative action or Ui action with workspace client script.

Thanks

Ankur Bawiskar
Tera Patron

@Kachu 

why to by pass the mandatory fields?

Won't this lead to data issue?

share screenshots of your declarative action

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