cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Dynamics 365 / CRM: Property _organizationid_value cannot be updated to null

I'm trying to use flow to create and update products in Dynamics 365 / CRM.

 

Creating products work fine. However, when I update a product record, I'm getting this error:

{
 "code": "",
 "message": "Property _organizationid_value cannot be updated to null. The reference property can only be deleted.",
 "innererror": {
 "message": "Property _organizationid_value cannot be updated to null. The reference property can only be deleted.",
 "type": "Microsoft.Crm.CrmHttpException",
 "stacktrace": " at Microsoft.Crm.Extensibility.OData.CrmODataUtilities.ValidatePatchInputProperties(EdmEntityObject entityDelta)\r\n at Microsoft.Crm.Extensibility.OData.EntityController.PatchEntity(String entityName, String key, EdmEntityObject entityDelta)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
 }
 }

The _organizationid_value is not a field I can set. It looks like there's something missing in the connector. 

 

Here's a screenshot of the configuration. Creating the record works with the same configuration:

record update.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Dynamics 365 / CRM: Property _organizationid_value cannot be updated to null

Hi Martijn,

 

Seems like, I have updated the Product in Dynamics 365.

I switch from Flow to Logic App due a bug in template (or wrong Metadata from Dynamics 365)

 

Anyway, I MAY update the JSON code, not just the Designer.

Please find below the piece of JSON code. 

What I have updated:

  1. Delete  "productstructure": null,
  2. Make sure the path in method patch, contains your Product GUID. (I highlight it below)

 

"Update_a_record": {

                "inputs": {

                    "body": {

                        "_defaultuomid_value": "2d4e220b-886c-e711-8113-c4346bac0a3c",

                        "_defaultuomscheduleid_value": "2c4e220b-886c-e711-8113-c4346bac0a3c",

                        "description": "descriptioin",

                        "name": "productname",

                        "price": 50,

                        "productnumber": "productId",

                        "quantitydecimal": 0

                    },

                    "host": {

                        "connection": {

                            "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"

                        }

                    },

                    "method": "patch",

                    "path": "/datasets/@{encodeURIComponent(encodeURIComponent('senturytires.crm'))}/tables/@{encodeURIComponent(encodeURIComponent('products'))}/items/@{encodeURIComponent(encodeURIComponent('b990c0a2-066d-e711-8117-c4346bac8af8'))}"

                },

                "runAfter": {

                    "List_records": [

                        "Succeeded"

                    ]

                },

                "type": "ApiConnection"

            }

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Dynamics 365 / CRM: Property _organizationid_value cannot be updated to null

Hi @MartijnE,

 

Thanks for the feedback.

 

I will make some tests and then update it here once I finished.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Regular Visitor

Re: Dynamics 365 / CRM: Property _organizationid_value cannot be updated to null

Hi,

 

Any update on this issue?

 

Regards,

 

Martijn

Highlighted
Frequent Visitor

Re: Dynamics 365 / CRM: Property _organizationid_value cannot be updated to null

Hi Martijn,

 

I couldn't create a product via Dynamics 365 connector.

Could you share your parameters to create a product? 

 

Thanks!

BTW, Logic App provides more information about errors and gives more usability than Flow. 

Highlighted
Frequent Visitor

Re: Dynamics 365 / CRM: Property _organizationid_value cannot be updated to null

Hi Martijn,

 

Seems like, I have updated the Product in Dynamics 365.

I switch from Flow to Logic App due a bug in template (or wrong Metadata from Dynamics 365)

 

Anyway, I MAY update the JSON code, not just the Designer.

Please find below the piece of JSON code. 

What I have updated:

  1. Delete  "productstructure": null,
  2. Make sure the path in method patch, contains your Product GUID. (I highlight it below)

 

"Update_a_record": {

                "inputs": {

                    "body": {

                        "_defaultuomid_value": "2d4e220b-886c-e711-8113-c4346bac0a3c",

                        "_defaultuomscheduleid_value": "2c4e220b-886c-e711-8113-c4346bac0a3c",

                        "description": "descriptioin",

                        "name": "productname",

                        "price": 50,

                        "productnumber": "productId",

                        "quantitydecimal": 0

                    },

                    "host": {

                        "connection": {

                            "name": "@parameters('$connections')['dynamicscrmonline']['connectionId']"

                        }

                    },

                    "method": "patch",

                    "path": "/datasets/@{encodeURIComponent(encodeURIComponent('senturytires.crm'))}/tables/@{encodeURIComponent(encodeURIComponent('products'))}/items/@{encodeURIComponent(encodeURIComponent('b990c0a2-066d-e711-8117-c4346bac8af8'))}"

                },

                "runAfter": {

                    "List_records": [

                        "Succeeded"

                    ]

                },

                "type": "ApiConnection"

            }

View solution in original post

Highlighted
Regular Visitor

Re: Dynamics 365 / CRM: Property _organizationid_value cannot be updated to null

There's some good guidance in your answer about the position of flow vs logic apps.

I'll have look into using logic apps or azure functions. It was my customers request to use flow.

 

Will this be fixed in Flow in the future? Or not anytime soon?

 

Thanks for the follow up!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (6,979)