We had a requirement to update a text area field of a custom object. As it was a bulk update, we use Database.upsert using an external id (happened through script already created in Mulesoft) and provided only text area field values. In this process what happened is - all the parent lookup field values changed to blank. Below are my queries-

  1. When salesforce executes upsert command, do we need to provide lookup field values again?

I haven't seen anything like this. Please correct me if we are doing something wrong over here.

1 Answer 1


An answer to your question 1:

Salesforce only updates the values provided in the update call, field values that are not specified in the update will remain unchanged.

You need to troubleshoot by checking below things.

  1. Check if any workflow/process builder is there which is updating this field to null.
  2. Check if any trigger is updating this value to null.
  3. Check if code the before Database.upsert statement sets the value of that field to null.
  4. Check if any of external data sources is sending null values.

If any of the check is true then you need to remove that.

  • 1
    Yes we have checked it already. Now checking the 3rd party systems mapping. Maybe it is setting up at multiple locations and one of them is making it blank. I will let you know. Thanks a lot for your answer.
    – Rohit
    Commented Feb 21, 2019 at 7:37
  • 1
    The culprit was the developer who developed scripts in MuleSoft. It was wrongly set as null at 2nd processing point. Thanks.
    – Rohit
    Commented Feb 21, 2019 at 9:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .