- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2023 01:27 AM
Hi All,
I have one record producer and for that record producer table I have written on change client script if they change field value the pop should generate. But i am facing issue in portal view has pop up is triggering twice in portal view whereas in native its coming properly only once. What could be the possible issue and how do I fix this. If anyone has pointers on this, please do share. PFB attached screenshot for reference.
Thanks in advance,
Kruthik Shivaprasad
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2023 01:51 AM
Try this:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '' || newValue == oldValue) {
return;
}
if (g_form.isNewRecord()) {
// do nothing, this code only applies to existing records
}
else {
var name = oldValue;
var sysID = g_form.getUniqueValue();
var iaowner = g_form.getValue('ia_owner');
g_form.addErrorMessage("Making any changes to the Intellectual Asset name will re-trigger the Marketing and Trademark approvals. " + link + " to re-trigger the Brandname Clearance");
if (newValue != oldValue) {
g_form.setValue("intellectual_asset_name", oldValue);
}
}
}
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2023 01:30 AM
@Kruthik M Shiva can you share the script from where this pop up is coming.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2023 01:34 AM
Hi @sushantmalsure ,
This is the script written.
Please tell what is the issue and how do i fix it.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2023 01:32 AM
You should have below at beginning of onChange() script:
if(newValue == oldValue){
return;
}
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2023 01:36 AM
Hi @sushantmalsure ,
Can you please tell where exactly in my code i need to change?