简体   繁体   中英

Display alert message using Form Script in Netsuite OpenAir in Project record

I have written a "Form script" for Project record in Netsuite-OpenAir. I would like to display an alert message on clicking on the "Save" button in Project record. The code that I have currently written in the form script is:

NSOA.meta.alert('Form Alert Message');

But it seems that this alert message is only displayed in the Form script log and not on the Project record (when clicked on Save). I also tried the traditional Javascript "alert('Form Alert');" message. But this to did not work. Hence how do I display an alert message in the Form script and prevent the user from saving the form?

Also a form script in OpenAir executes on 3 events namely: On Submit, Before Save and After Save. So how do I execute an onChange function when a field value is changed? Rather than executing a function on submit of the form?

Thanks in advance.

The format to display an error is

 NSOA.form.error('field', 'message');

There is no onChange event in OpenAir

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM