Skip to content

Updating SalesOrderDetail Null Reference Exception #163

Closed
@Garbageous

Description

@Garbageous

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:

image

This is the error and internal error I get:

image
image

Version:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions