0

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

Muds
  • 4,006
  • 5
  • 31
  • 53

1 Answers1

0

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.

eyescream
  • 18,088
  • 2
  • 34
  • 46
  • thanks for your answer @eyescream but somehow this doesnt work either, I set the API to Bulk API and pass on #NA but it still doesnt clear the list – Muds Jan 12 '23 at 08:58
  • Go to Salesforce -> Setup -> bulk jobs (or something like that) and there should be your request and response as downloadable files. Was what got uploaded really a CSV? – eyescream Jan 12 '23 at 18:33