Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Portal Button

Rosy14
Kilo Sage

How Can I add a Reject button in My Form widget?

1 REPLY 1

Rosy14
Kilo Sage

HTML:

<button ng-click="c.uiAction('decline')" class="btn btn-default">
Decline
</button>

Serverside:

// Get table & sys_id
data.table = input.table;
data.sys_id = input.sys_id;

if (input && input.action) {
var action = input.action;
if(action == 'decline'){
var qu = new GlideRecord("sn_customerservice_quotes");
qu.addQuery('u_buy_plan_id',data.sys_id);
while(qu.next()){
qu.setValue('state',2);
}
gs.addInfoMessage("Quote is Declined !");
}

 

I am not getting how to add it in client side.

 

Plz help.