adding a message to the top of the from

brown9394
Tera Expert

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.');

        }

}

11 REPLIES 11

Hi James,


Its also working fine for me.


Thanks,


Farukh


Could you please post screen shots of client script ??


Abhinay Erra
Giga Sage

It works for me. Its display the message on the form once you click submit button for a newly opened record


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?


something like



function onLoad() {


  if (g_form.getValue('state') == 'draft'){




  Show msg


  }


  else{




  dont show


  }


}