Using a clientscript, is it possible to revert bac...
# suitescript
t
Using a clientscript, is it possible to revert back the old value if the condition is false
const scopeId = clientLib.*isValidForPackUpdate*(context);
           
const validScopeId = cfg.ONSITE_DAYS_REQUESTED.*indexOf*(*parseInt*(scopeId)) != -1;
           
if (!validScopeId) {
               
dialog.*alert*({
                   
title: 'My System',
                   
message: cfg.ERROR_MESSAGE.INVALID_PACKS.MESSAGE
               
});
               
return false;
           
}
b
you need to keep track of the old value yourself
and set it back to that value
t
i see thanks @battk