I'm trying via Bulk API update Opportunity field OwnerId to empty (or null) value. But it impossible. If I set a "" (empty value string) to field OwnerId - update has success but nothing to change. If I set "null" to this field - update falling with INVALID_CROSS_REFERENCE_KEY. Heed help, thx!

  • 6
    Access to data is based on the owner's profile/permission sets (and probably other logic too) so its not a surprising design decision for the platform. If you explain what your end goal is you may get an answer that helps with that.
    – Keith C
    Commented Jul 8, 2016 at 8:44

1 Answer 1


All Records in Salesforce must have an Owner which is either a User or a Queue, if you try and set OwnerId to Null or blank "", this will always fail as the field is mandatory therefore Null is not an acceptable value.

As the Salesforce security model for data is built around record ownership this is correct behaviour as it will mean that any relevant users are able to access this Opportunity. The record owner will be important for the record visibility due to the role hierarchy, OWD and sharing rules so it would be a problem to make have a null or empty value.

I am not sure I understand what business case there is for not having an Owner for a record? Even if it is not an individual then a queue should be used for the record to be picked up from for update. Please explain what you are trying to achieve then you will be able to get an answer that helps you.

  • >>With the records that you have set the ownerid to "" - what actually displays on the record? - display same OwnerId as was in field before update.
    – user34219
    Commented Jul 8, 2016 at 8:46
  • So it is not changing the owner if you try using " " - is that correct?
    – Dave Humm
    Commented Jul 8, 2016 at 8:48
  • result same - OwnerId not change.
    – user34219
    Commented Jul 8, 2016 at 8:51

You must log in to answer this question.

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