On our Account and Contact entities we have an 'Address Block' field. This field is an aggregate of the individual address fields and at the Contact level is populated and made read only by a JScript web resource. Recently I created a new state field on Contacts so we could map the state values from Accounts to Contacts when we create new ones. The old field didn't have the same values as the state field at the Account level. Now I get the following error anytime we try to save or change individual address fields on an Account.
This happens when trying to change the existing value of an Accounts state field:
This happens when trying to save the new value of an Accounts state field:
Any ideas what might be causing this or how I could diagnose the source of the issue?
Thanks
*This post is locked for comments
That did it! It was a poorly name web resource that I'd overlooked, I just need to rename the field it was calling in the script.
Well you don't have to look through all WebResources - go to your form customization, open form properties and in Form Properties you will have all WebResources related to this form. Now you can check if something is bound to your OnSave event and OnChange event for specific field and it will point to specific WebResource that contains the function.
Yes, if I could find the JScript I could post it but this is an old system and the webresources don't clearly point to which scripts could be involved.
Is there a way find which customized event is being initiated outside of reviewing each JScript in the web resources library?
It clearily states that you have a custom Javascript for "OnChange" event of your "tpr_state" field (I believe the same logic is run when you save the form). Post a code of this logic, otherwise it's hard to help you.
But using my telepathic powers, I bet that you are doing some Xrm.Page.getAttribute("attributename") on a field that simply does not exist on the form and later you are calling getSelectedOption for this which is throwing this exception.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156