1 Reply Latest reply on Sep 3, 2019 7:05 AM by Prakash Jain

    CAI OData patch to Dynamics365 - how to use only updated/defined values

    Daniel Noriega New Member

      Hi,

      I have to update records in CRM for a very wide table using CAI (not DI), for which I have an Service Connector very similar to the one in this link How to access MS Dynamics CRM entities from ICAI

      The process will receive different input fields and I need to patch only the fields that I have received.

      My problem is that CAI is sending all fields into the patch, including empty fields. I can get around this by having a PO with only the fields with data defined for each combination/type of update. However, I am afraid this will be cumbersome to implement.

       

      This input will work ok:

        <Plot>

           <pl_plotid>ca4984bf-491d-e811-a8a4-0022480173bb</pl_plotid>

           <pl_date1>2003-03-03</pl_date1>

        </Plot>

      But this second input will not:

        <Plot>

           <pl_plotid>ca4984bf-491d-e811-a8a4-0022480173bb</pl_plotid>

           <pl_date1>2003-03-03</pl_date1>

           <pl_date2></pl_date2>

        </Plot>

      The second test input gives an error of "<message>DateTime is less than minumum value supported by CrmDateTime. Actual value: 01/01/0001 00:00:00, Minimum value supported: 01/01/1753 00:00:00</message>"

       

      What I am hoping for is a simple way to include pl_date2 only if my input is not empty, as I will have a several dozen fields to check.