Hello, how can I pass the simplest parameters to a...
# suitescript
m
Hello, how can I pass the simplest parameters to a function that is called on the client?
Copy code
form.addButton({
            id: 'apply_filter',
            label: 'Apply Filters',
            functionName: 'onClickApplyFilter'
        })
c
What do you mean? You can use global variables in a client script, if that helps
k
you can do the following
Copy code
functionName: 'anClickApplyFilter(' + param + ')'
or in 2.1
Copy code
functionName: `onClickApplyFilter(${param})`
👀 1
if your param is an object though you will need to JSON.stringify it