Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

I added a related list declarative action Submit, the button does not work

Siris
Tera Contributor

How to add functionality to the button using server script or client script, so that it updates the record state from pending to submitted.

9 REPLIES 9

Siris
Tera Contributor

@Ankur Bawiskar, Hi - sorry for delayed response.  I checked OOB related list actions.  I want the same functionality as OOB UI actions in workspace list view.  The buttons are appearing and functionality also works, but when I replicate the OOB UI actions like submit, but the conditions which are calling a script include is not working.

 

For example, this reject button:  condition !current.isNewRecord() && (new TimeCardUIActionHelper(current)).canReject()

 
 
 

 

 

@Siris 

share your workspace form button config screenshots

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

@Ankur Bawiskar Hi, sure

Hi @Siris ,

Can you check whether the the state field is a choice field instead of string.

If it's a choice field then you need to give its internal value for the choices.

 

Resolution:

current.state=3; //(internal value for the option approved)

current.update();

 

If this works, kindly mark it as helpful and accept my solution..

Siris
Tera Contributor

Its not form button, list view button - so i added related list action assignments