Create a Popup with Yes/No using Ui actions and Ui Page in ServiceNow

Harish Ragz
Kilo Guru

Create a new button "Create Change Request" on the incident form, upon clicking on that a Yes / No popup should appear and upon clicking YES a change request will have to be created against the incident.(Depends on Ui Actions, Ui Page and Angular.js).

I'm new to Service Now , I need a answer for this question?. Please can anybody help me.

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Hareesh,




You can use something as below



Action Name: moveahead


onclick: valconfirm();



with below code




//for client end


function valconfirm()


{


var ans=confirm('Do you want to proceed');


if(ans==true)


{


gsftSubmit(gel('moveahead'));


}


else{


return false;


}


}




//for server side


createchange();



function createchange();


{


//code for insertion of change in change table


}


View solution in original post

6 REPLIES 6

Jaspal Singh
Mega Patron
Mega Patron

Hi Hareesh,




You can use something as below



Action Name: moveahead


onclick: valconfirm();



with below code




//for client end


function valconfirm()


{


var ans=confirm('Do you want to proceed');


if(ans==true)


{


gsftSubmit(gel('moveahead'));


}


else{


return false;


}


}




//for server side


createchange();



function createchange();


{


//code for insertion of change in change table


}


Hi Jaspal singh,



Thank you for your reply.



Regards,


K.Hareesh Reddy.


Hi Hareesh,



If the above solution worked you can mark this thread as correct & close it so that it does not appear in unanswered list.


Hi Jaspal,



Where I should put these codes?



In UI Page or in some where else?



Regards,


Sudipta Pattnayak