Automatically reload page after clicking button on portal

Rosy14
Tera Guru

How to achive this?

codes are below.

HTML

<button type="button" class="btn btn-default" ng-click="c.uiAction2('select')" ng-if="data.showButtonSel">${Select Quote}</button>

 

Client side:

c = this;
c.uiAction2 = function(action) {
c.data.action2 = action;
c.server.update().then(function() {
c.data.action2 = undefined;
})
}

 

Server:

if (input.action3 == 'approve') {
qu = new GlideRecord("sn_customerservice_quotes");
qu.get(data.sys_id);
qu.query();
while (qu.next()) {

qu.setValue('state', app);
qu.update();
}
}

1 ACCEPTED SOLUTION

Anirudh Pathak
Mega Sage

Hi @Rosy14,

You can use window.location.reload(); to reload the page.

View solution in original post

3 REPLIES 3

Anirudh Pathak
Mega Sage

Hi @Rosy14,

You can use window.location.reload(); to reload the page.

Where should I add this?

 

Hi @Rosy14 ,

In your client side code