How to Clear a pickup list value in Salesforce while updating from AWS APPFlow

205 Views Asked by At

We are trying to push data into a custom SalesForce object using AWS AppFlow, the object is a multi select pickup list and expects 0-* items. The issue is once the value is set through AppFlow the value is not cleared when the property is set to null again. We are mapping the field to an Empty String when we want to clear it.

We have tried setting an Empty XML Tag but sadly that doesn't clear the value in Salesforce

1

There are 1 best solutions below

2
On

Do you know which Salesforce API this uses behind the scenes?

In SOAP API you pass special fieldsToNull tag. See https://ideas.salesforce.com/s/idea/a0B8W00000GdjWwUAJ/allow-nulls-to-be-passed-as-a-valid-value-via-the-apis?sfdcIFrameOrigin=null and https://developer.salesforce.com/docs/atlas.en-us.238.0.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm?q=fieldstonull

In "normal" (synchronous) REST API should be just a null node in JSON

{
"Id" : "001...",
"Description": null
}

And in bulk REST API... depends. If you pass JSON - same as above. If you pass a CSV - use #N/A.