OnChange Script Not Working 2019 R1 OpportunityDetailBox

SOLVED

Has anyone else come across the issue where OnChange Script does not work on the OpportunityDetailBox in 2019 R1?

I have never had issues with this OnChange Script before.

If I do a Create Script on oppo_holdreason to validate on save, it works. But the OnChange does not do anything. I have tried multiple OnChange scripts in multiple fields but no result.

Here is the script I am using on the OpportunityDetailBox on a field using the Yes/No selection dropdown. Do you see any errors with it?

 

if (this.value == 'Y')

{

oppo_holdreason.required = true;

oppo_proceed.required = true;

}

Thank you!

Parents
  • +1
    verified answer

    Stephanie

    If you are working with a field within the Opportunity table I guess one thing to ask is whether the field is within the opportunity status box and if it is managed by workflow?  If it is then you need to put the onchange rule on the workflow rule and the action that represents the field.

    But generally you can test whether a 'onChange' script is triggered by adding a test script into the field.  I use something like this

    crm.infoMessage(crm.getTrans('colnames', this.name) + ' has been changed')

Reply
  • +1
    verified answer

    Stephanie

    If you are working with a field within the Opportunity table I guess one thing to ask is whether the field is within the opportunity status box and if it is managed by workflow?  If it is then you need to put the onchange rule on the workflow rule and the action that represents the field.

    But generally you can test whether a 'onChange' script is triggered by adding a test script into the field.  I use something like this

    crm.infoMessage(crm.getTrans('colnames', this.name) + ' has been changed')

Children
No Data