adding a message to the top of the from
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 01:44 PM
Hello Experts,
I have a client script that checks if the record is new and executes a message on top of the screen for users. How do I extend this client script to show the same message after submit (record is still in the same 'draft' state after submit) if it's not 'New'?
function onLoad() {
if (g_form.isNewRecord()) {
g_form.addInfoMessage('User message here.');
}
}
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 02:13 PM
Hi James,
Its also working fine for me.
Thanks,
Farukh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 02:25 PM
Could you please post screen shots of client script ??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 01:55 PM
It works for me. Its display the message on the form once you click submit button for a newly opened record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 02:47 PM
It seems to me this would be an onLoad client script to check the state of the record and if it is in the 'foobar' state show the alert?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 02:52 PM
something like
function onLoad() {
if (g_form.getValue('state') == 'draft'){
Show msg
}
else{
dont show
}
}