Reset Form Controller in UI Builder

SiddhardhaN
Tera Guru

I am trying to create new record in UI Builder. A button click would redirect the new page and try to create new record using form component (I set the value of sys_id to -1). However, if user navigates to back and tries to click on that button again - I want to force the page to load the new record page. But page is still holding unfinished form from previous attempt; how to force the page to reload and set to form controller to reset to -1. 

4 REPLIES 4

SiddhardhaN
Tera Guru

@Brad Tilton@mgowen - any pointers how to do in UI builder? Basically, for every button click - it should open new page record. Please suggest.

IronPotato
Mega Sage

Hi @SiddhardhaN ,

 

it's not. These TABs are heavily cached. You would have to close the new unfinished record when user is going back. 

thanks @IronPotato for the response. How do you close the unfinished record? 

just from curiosity, why would user click on button to create new record and then go back just to create another and not finish previous one? 

 

If you want to close the TAB if user will not interact with this page for certain time, I think you could possibly try to add setTimout client script into page ready and for example after 1 minute instruct page to close the tab by emitting  "SCREEN_STATUS_CHANGED" event with a payload { status: "closed" }

 

check this thread - Solved: UI Builder - Close tab and redirect back to list t... - ServiceNow Community