cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jeanpro
Level: Powered On

Updating record in Salesforce with multi-select picklist

Hi all,

 

I am having an issue when updating a record using the Salesforce connector. The issue only happens when I try to update a field in the record that has multi-select picklist:

 

brands.JPG

 

When I try to update this field, the request receives the below error:

 

 

{
  "status": 400,
  "message": "A value must be provided for item.\r\nclientRequestId: 99098cd0-2514-426d-978c-****",
  "source": "salesforce-*****"
}

 

 

On the other hand, when I try to update the same record without referring to any of the picklist fields I receive a successfull response with all record fields, looking carefully at the picklist fields I notice that they have a "@odata.type" definition:

 

 

{
  "@odata.context": "https://sales*****.net/v2/$metadata#datasets('default')/tables('Contact')/items/$entity",
  "@odata.etag": "",
  "ItemInternalId": "1e76702a-fa17-48ab-9fa1-*****",
  "Id": "003570000****M",
****** MULTIPLE OTHER FIELDS ******
  "Last_Checked_By__c": null,
  "Extension_Number__c": null,
  "Liner_Brands__c@odata.type": "#Collection(String)",
  "Liner_Brands__c": [
    "Se****"
  ],
  "Decision_Maker__c@odata.type": "#Collection(String)",
  "Decision_Maker__c": [],
  "Contact_Type__c@odata.type": "#Collection(String)",
  "Contact_Type__c": [
    "Commercial"
  ],
  "External_ID__c": "BR0****1705",
  "First_Name_English__c": "Leandro",
  "Last_Name_English__c": "Paozinho",
  "Team_Contact__c": "No"
}

 

 

When I tried to use the update by EXTERNAL Id action I received a more detailed explanation:

 

 

 

{
  "error": {
    "code": 502,
    "source": "flow-*****m.net",
    "clientRequestId": "a5f83d7d-e714-4ace-b788-*****",
    "message": "BadGateway",
    "innerError": {
      "status": 502,
      "message": "Salesforce failed to complete task: Message: Cannot deserialize instance of multipicklist from START_ARRAY value [line:1, column:23]\r\nclientRequestId: a5f83d7d-e714-4ace-b788-******",      "source": "Salesforce.Common",
      "errors": []
    }
  }
}

 

 

Hence the question is: How can I adapt my body to define the data type on it?

 

Current body generated from update record (not working):

 

{
"Field1": ["str1", "str2"]
}

 

 

Return from server (When not referring to the Field1 nor Field2):

[
   "Field1@odata.type": "#Collection(String)",
   "Field1": ["str1", "str2"],
  "Field2@odata.type": "#Collection(String)",
"Field2": ["str1", "str2"], ]

Any suggestion/comment is much appreciated!

 

Jean Phelippe

 

 

----------------------------

Quick Update:
I saw something workable for Sharepoint here: https://veenstra.me.uk/2018/04/18/microsoft-flow-create-sharepoint-list-item-and-get-a-badrequest/

But not sure how to adapt my Salesforce flow to incorporate this content definition. My knowledge on Odata is very limited. Appreciate any tips Smiley Happy

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 165 members 4,852 guests
Please welcome our newest community members: