SuiteScript 2.0 Two actions on submit button

Viewed 1678

I need add two action into submit button, I succeed on that but because I can't find correct function from API, there is two buttons. Like this

What i get

I want it like this:

Example working buttoin

What I have tried

form.addSubmitButton({ label: 'Action 1'});
form.addSubmitButton({ label: 'Action 2'});

And

form.addSubmitButton({ id : 'action', label: 'Action 1'});
form.addSubmitButton({ id : 'action', label: 'Action 2'});

And

form.addSubmitButton({ id: 'action1', label: 'Action 1'});
var test = form.addSubmitButton({ id: 'action2', label: 'Action 2'});
test.isHidden = true;
1 Answers

Something that worked for me was adding the name attribute to each submit button using client script. That way when the user clicks it will send the name as a parameter.

Related