I am creating a process builder on the Campaign Member object, and as a criteria for an immediate action I need to reference the Owner Id of the associated Lead or Contact. I figured LeadOrContactOwnerId would do it, but it doesn't seem to be working. In an attempt to debug, I posted the value of LeadOrContactOwnerId to Chatter, and it appears to be blank.

Does anyone have any experience with this?

  • 1
    LeadOrContactOwnerId is one of those SFDC convenience fields that don't actually exist on the sobject – cropredy May 2 '16 at 21:33
  • cropredy, yes, but surely it must have some use? – Jesper Bjerrum May 3 '16 at 12:19

You should be able traverse to the relationship. When selecting your field, choose Contact ID > > Owner ID and similarly Lead ID > > Owner ID.

If you want an alternative solution, you should be able to use a formula like the following:

BLANKVALUE(Contact.OwnerId, Lead.OwnerId)
  • Adrian, I've tried referencing the Lead/Contact OwnerId via the relationships, but one of the relationships will always not be defined and therefore return an access error. – Jesper Bjerrum May 2 '16 at 19:58
  • Can't you write them as separate criteria? – Adrian Larson May 2 '16 at 19:59
  • Yes, but if salesforce is providing me with a more elegant solution why not use it? (I do have workaround using a formula). – Jesper Bjerrum May 2 '16 at 20:18
  • 3
    Formula is best in my experience. PB can throw errors if you try to evaluate field on related object and lookup is null. It may be better now but in past have had to add criteria that lookup is not null, and the criteria had to be listed before the relationship field to avoid error. – gorav May 2 '16 at 23:27
  • gorav, that's exactly what I did. – Jesper Bjerrum May 3 '16 at 12:17

I was able to figure out how to do this in Process Builder. You need to create a Contact Criteria first with the Condition that Campaign Member.Lead_ID__c Is null Boolean True. (I am using the string field that gets populated in Campaign Member)

This means that the Member is a Contact. I then made the update from the standpoint of using the Contact Record. No criteria, Field Reference [Campaign Member].Contact.Owner.Id.

Then create a second for Lead Criteria and do everything above except Boolean is False. Update is based on the Lead record. No criteria, Field Reference [Campaign Member].Lead.Owner:User.Id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.