Can Parameters be Added to Button Functions

Hi, is it possible to add parameters to a button function? For instance, if I have button created beforeLoad and a client script that executes the function, can I pass as a function argument data from the user event script to the client script? Right now, it seems when I do form.addButton and set the functionName property, the function name is just text and I can’t add any arguments.

Beginner Asked on September 17, 2019 in SuiteScript.
Add Comment
1 Answer(s)

Yes, I believe this works :

functionName : ‘buttonFunction(‘ + var1 + ‘)’

You should be able to pass multiple variable values separated by ‘,’  although I believe you will be limited to only passing string/number values using this type of format

Intermediate Answered on September 17, 2019.

Great, thanks for the tip!

on September 17, 2019.

It worked perfectly by the way! Thanks again!

on September 17, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor