Adding UI action info message

nealp_
Tera Contributor

Hello experts,

How do I add an info message on a UI action button 'Submit'?   I want a message to show on top of the page which says "Your request has been submitted" once the 'Submit' button is clicked?

5 REPLIES 5

j3d1
Giga Contributor

Hi Neal,



adding, gs.addInfoMessage("your message here"); will display a message for you.



good luck.



-Ben


nealp_
Tera Contributor

Hi Ben, thanks for your reply. I've tried that, but not sure if I'm placing it correctly.



Here is my script -



function insertPIRDraft(){


  var arrValues = g_form.getMissingFields().toString().split(',');


  for (var i=0;i<arrValues.length;i++){


  g_form.setMandatory(arrValues[i],false);


  }


  gsftSubmit(null, g_form.getFormElement(), 'sysverb_insert_and_stay');


}


if(typeof window == 'undefined'){


  gs.include('ActionUtils');


  var au = new ActionUtils();


  au.postInsert(current);


  current.update();


  action.setRedirectURL(current);


  gs.addInfoMessage("Your changes have been saved as Draft.");


}


Yes the syntax is correct. What table is the UI action on?


It's on the Task table.