One Star

Updating Salesforce with empty String.

Hey,
I stumbled upon a "problem" with the Salesforce Component - or I am actually not sure if the behavior is desired or not.

If I update ( upsert ) values from existing entries in Salesforce, these changes are not recognized since the value is an empty String. To get the desired behavior - I have to replace all "" with null.

I have a few scenarios how I think this is solvable - but, since I don't want to write a helper function and use it in each field I map, I am looking for something more generic.
- Improved SF component, with that option just checkable (replace all "" with null).
- custom component, looking through all rows, replacing "" with null.

So my question is : How can I create this custom component, automatically "recieving" all the rows and work through them - any ideas?

Best Regards
3 REPLIES
Two Stars

Re: Updating Salesforce with empty String.

Hello Team,

 

I am also facing the same issue, has anyone any solution for the same?

Moderator

Re: Updating Salesforce with empty String.

Hello,

Can you please clarify in which Talend version/edition you are?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Moderator

Re: Updating Salesforce with empty String.

Hello,

Are you able to try adding one more component tmap in between both your connectors and for that column alone check for empty string if so then set null, something like
row1.field.isempty()? null:row1.field.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.