Description
Hello,
We create an SalesOrder, save it and then try to update the PricePerUnit on the SalesOrderDetail before fulfilling the SalesOrder. The SalesOrderDetail is auto created in Dynamics because of some business logic. I can see it is the correct SalesOrderDetail entity that is being returned. This is the first time we develop this code and I have no idea if it was working in earlier versions.
Normally I would take this up with our Dynamics team to investigate errors but since it seems that the errors are thrown within the ServiceClient package, specifically Key Null Exception from GetEntityMetadata, it leads me to believe that perhaps there is some bug? I might be wrong, not entirely sure since I had issues while trying to debug with Just My Code off. Perhaps we are doing something wrong?
This is the code being run:
This is the error and internal error I get: