Automatically reload/refresh the page including value on the variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 08:49 PM
Hello all,
i experienced a strange issue in technical view where i completed the order of RITM and use the back button in browser to submit a new request using the same catalog item.
For example:
I am requesting to retire this pc:
after ordering i will click the back button on the browser to submit a new request:
and there are still value on the variables which is not correct because the PC variable is not visible even though the type of device has a value:
How to reload or refresh the page and clear all value? I tried using onLoad script but it is not working.
This case is not happening in SP view.
When i click go back button of the browser in ServicePortal view, all variables are have no any value and this is what i want to achieve in technival view.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 09:27 PM
Hi @Al-jhon ,
Could you please share onLoad client script?
It should work with
g_form.clearValue('field_name');
g_form.clearOptions('field_name');
Please mark my answer helpful and accept as a solution if it helped 👍✔️
Kavita Bhojane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 09:28 PM
Hi @Al-jhon ,
Could you please share onLoad client script?
It should work with:
g_form.clearValue('field_name');
g_form.clearOptions('field_name');
Please mark my answer helpful and accept as a solution if it helped 👍✔️
Kavita Bhojane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 09:54 PM
Hi @Al-jhon ,
That's strange. Can you try to check using this onLoad Client Script on catalog-
function onLoad() {
// Reset all variable fields to their default values or empty
g_form.clearValues();
}
Please mark as Accepted Solution if this solves your query .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 07:17 PM
Hello @Community Alums using OnLoad clientscript is not working when doing browser back button.