cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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
Community Support
Community Support

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.

Hi,

 

Any update on this issue?

 

Regards,

 

Martijn

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. 

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

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (29,642)