Friday, April 15, 2016

Dynamics CRM 2016 and Legacy Entities

This is not the first time I've run into a problem with so called "Legacy Entities". I am referring to the entities that have been left out in the cold since CRM 2013. These include
  • address
  • opportunity product
  • quote product
  • order product
  • invoice product

There are some things that these entities don't support which include
  • Accessible in the Tablet App
  • Update attributes with workflows
  • Business Rules (though oddly Opportunity product does support business rules)
  • Old style forms

I have also come across with problems when upgrading to CRM 2016. This problem occurred on Opportunity Products form which had been customised in CRM 2015. I removed a number of fields I didn't need and it was working fine. 
After the upgrade to 2016 though I was getting this JavaScript error on form load

Field:window
Event:onload
Error:Unable to get property 'addOnChange' of undefined or null reference

Now that was not from any JavaScript code that I had but from a Microsoft library called OpportunityProduct_main_system_library.js

When I looked into the code I could see that it was referring to attributes that were not on the form:
Manual discount amount
Tax

When I added these back onto the form and hid them, the error went away. 

Moral of the story: Don't delete attributes from legacy forms - just hide them. 

1 comment:

Eonic WPM said...

I had a similar problem with the ship To "WillCall" on the order entity. Thanks for the article it showed me where to look.