once created RITM asking save that pages again and again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 11:49 PM
Hello,
my issue is after creating RITM page is asking continusly saving the form . if i approved that time aslo asking :changes you may not saved"
here in variable editor using list collector . am using g_form.setValue
any one help here to fix this issue
if i clicked UAT below related to uat value is populated thorugh list collector
am using this code :
var val = g_form.getValue('data_warehouse_grant_access'); //list collector label name
if (g_form.getValue('development') == 'true') {
val += "," + '06eb97a01be74a941c21edbbe54bcb91';//this sys id is list collector sys id
g_form.setValue('data_warehouse_grant_access', val);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2024 12:08 AM
Is this onLoad code? Because that would explain the issue if you are setting values through client scripts. Every save loads the form again, you set your field again, so it has changed. If the data really needs to be set through a client script, you will need to evaluate the current field value as well, since you are now continuously updating the form. Put an 'if val is not sys_id, setValue' in there. Then it won't update your form anymore (but also check if this really is something you need to do client side). Server side would be better (flow/br).
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2024 12:09 AM
Hi @sakila
When you update the list collector using g_form.setValue, it may trigger the form’s dirty check (unsaved changes warning), which leads to the "Changes you made may not be saved" prompt continuously appearing.
function updateListCollector() {
var val = g_form.getValue('data_warehouse_grant_access'); // list collector field
if (g_form.getValue('development') == 'true') {
var newValue = '06eb97a01be74a941c21edbbe54bcb91'; // sys_id to be added
if (!val.includes(newValue)) { // Only add if it's not already included
val += ',' + newValue;
g_form.setValue('data_warehouse_grant_access', val);
}
}
}
Ensure that the updateListCollector function is triggered only when necessary, for example, when a specific field value changes or when the form is loaded.
Also check other scripts and UI policies is not interfering with the form save process.
I hope my answer helps you to resolve your issue, if yes please mark answer correct & helpful.
thank you
rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2024 12:31 AM
Hi
its not working id is selected only choice is development means list collector value should come like related development (idcdevlopemt0) but now all value is appearing here
i used like this catlog client script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
function updateListCollector() {
var val = g_form.getValue('data_warehouse_grant_access'); // list collector field
if (g_form.getValue('development') == 'true') {
var newValue = '06eb97a01be74a941c21edbbe54bcb91'; // sys_id to be added
if (!val.includes(newValue)) { // Only add if it's not already included
val += ',' + newValue;
g_form.setValue('data_warehouse_grant_access', val);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2024 12:54 AM
in catalog client script is possible