cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vikesh
New Member

Update Dynamics 365 record - All optionset label fields being selected for update. 414 - Request URI too long

Hi,

 

I'm trying to update a contact record in Dynamics 365 using Flow.

I've identified the record passed it to the "Update a Record" action.

I'm updating one date field from the list of fields, however all of the optionset label fields are being selected in the update request. Due to this I am getting an error with statuscode 414 - RequestUriTooLong.

 

Is there a way to have the request only update the date field that is being specified and ignore all of the Optionset fields? 

 

When peaking at the code behind the Update a record action I can also see the fields being specified, below is an extract of the fields:

 

"body": {
"_xx_clientstatuses_label": "",
"_preferredcontactmethodcode_label": "",
"_xx_title1_label": "",
"_xx_3rdattendance_label": "",
"_xx_addnewloc_label": "",
"_address1_addresstypecode_label": "",
"_address1_freighttermscode_label": "",
"_address2_addresstypecode_label": "",
"_address3_addresstypecode_label": "",
"xx_dateofbirthul": "@items('Apply_to_each')?['xx_dateofbirthdateonly']",
"_xx_dbsselect_label": "",

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Vikesh 

 

Firstly, the record identifier you are using is not correct. Update the flow as shown in the screenshot: 

ccs.PNG

 

Assign the dynamic field values to all the fields that you want to update. Run the flow and check if you continue to face the issue. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

6 REPLIES 6

Hi @Vikesh 

 

Can you please share a screenshot of the flow? That way we might better identify the issue and assist you with this. 

@yashag2255 

 

Flow.png

 

There's only one field being specified to be updated in the Update record function.

 

Seems like I need a way to remove the optionset label fields from the request that is being generated (as seen when peaking the code)

{
    "inputs": {
        "host": {
            "connection": {
                "name": "@parameters('$connections')['shared_dynamicscrmonline']['connectionId']"
            }
        },
        "method": "patch",
        "body": {
            "_xx_title1_label": "",
            "_xx_3rdparty_label": "",
            "_xx_addnewtime_label": "",
            "_address1_addresstypecode_label": "",
            "_address1_freighttermscode_label": "",
            "_address2_addresstypecode_label": "",
            "_address3_addresstypecode_label": "",
            "xx_ageinyearssimple": 12,
            "_xx_doyoualreadyhavetime_label": "",
            "_xx_finalchoice_label": "",
            "_xx_anycreds_label": "",
            "_parentcustomerid_type": "",
            "_customersizecode_label": "",
            "_xx_anotheroption_label": ""
             ....
        },
        "path": "/datasets/@{encodeURIComponent(encodeURIComponent('org0000000.crm00'))}/tables/@{encodeURIComponent(encodeURIComponent('contacts'))}/items/@{encodeURIComponent(encodeURIComponent(items('Apply_to_each')))}",
        "authentication": "@parameters('$authentication')"
    },
    "metadata": {
        "flowSystemMetadata": {
            "swaggerOperationId": "PatchItem"
        }
    }
}

 

 

I can't see any options to do so and am not sure why they are even being sent as empty strings.

Hi @Vikesh 

 

Can you share an expanded view of the flow? Are you listing and updating the records of the same entity? 

@yashag2255 

Yes, listing and updating the same records - contacts

There is a lot of fields on the contact entity so would take a lot of screenshots, below are all the fields that have some input against them.

 

Flow Detail 1.PNG

 

Flow Detail 2.PNG

 

Age in Years (Simple) is a whole number field, simply trying to save the value 12 against that field. 

 

Hi @Vikesh 

 

Firstly, the record identifier you are using is not correct. Update the flow as shown in the screenshot: 

ccs.PNG

 

Assign the dynamic field values to all the fields that you want to update. Run the flow and check if you continue to face the issue. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thanks again fro your help @yashag2255 

Solved both my issues promptly! 🙂 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,202)