UI Action to save and update

riaz_mansuri
Kilo Guru

Hello,

I have the below UI action which works great. However, when it is clicked I would like the record Updated (Saved).

What do I need to add to the script in order for this to happen?

function listener(){

var formalName = g_user.getFullName();

 

    g_form.setValue('state');

g_form.setValue('state',"Closure Requested");

g_form.setValue('work_notes',"Requested Closure");

}

Thanks

Riaz

7 REPLIES 7

Hi Sneha,



Sorry confused by your code. All I need is when the Request Closure button is clicked it changes the state and then Updates the record so it rsaves and returns back to the list



Thank,s


Riaz


Jorge_de_Araujo
Giga Guru

Hello Riaz,



Try to put current.update();



Best regards,


Rashmi Bansal
Mega Guru

Hi Riaz,



Try below code at the end of your script.



if(g_form.isNewRecord()){


      } else {


              gsftSubmit(gel('sysverb_update'));}


             


      }