RE: How to Invoke Button Function with Client Script

I’ve added a button with a beforeLoad UE script. When the user clicks the button, it should create a new instance of a custom record. As I understand, you need a client script to handle the button click. I seem to be having trouble invoking my button function, though. I set the name of the function when I created the button in the UE script. Then I defined the named function in my client script. But when the button is clicked, the function in the client script is never invoked. Anyone know what I’m missing?

mmascitto Beginner Asked on September 16, 2019 in SuiteScript.
Add Comment
9 Answers

It looks like you’re right. You do have to use console.log to see any of the logs.

From there, i figured out the type property of record.create should be the custom record ID (e.g. ‘customrecord_trainevent’). I was getting an error with this for a while because i had the prefix wrong. In the end, though, I realized what I’m actually looking to do is not use record.create, but rather redirect the user to the entry form so they can enter the data and create the new record in the UI.

Beginner Answered on September 16, 2019.

Moving forward, avoid asking follow up questions as much as possible as it makes the thread harder to read. For example, you entitled the question “How to Invoke Button Function with Client Script” and then later on you asked about viewing the logs from the client script.

on September 17, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.