I am trying to apply a client script to a custom r...
# suitescript
a
I am trying to apply a client script to a custom record (MFG Work Details) I can't get it to work. Here's what I've tried: • Deploying it to the record. • Setting form.clientScriptFileId in a UE Script • Setting form.clientScriptModulePath in a UE Script The UE script does work. It's a locked record if that makes a difference.
s
Client scripts dont execute in VIEW mode and if its a locked record, what other context is there?
a
Ah my bad
How can I add a button that accomplishes an action in view mode?
b
Use Form.clientScriptModulePath to add your button click handler script to your form
use Form.addButton(options) to add your button and set the
functionName
parameter to whatever key in the client script holds your button handler function