5

My org has a custom object - call it Wario__c - with two lookup fields. It can be the child of either a Lead or a Contact object.

In the Custom Object Definition for Wario, it displays Contact (Contact__c) and Lead (Lead__c) under the header "Custom Fields & Relationships."

Custom Fields & Relationships for Wario__c

So far, so good. In the page layout, the Contact and Lead fields are "in use" and located prominently on the page.

But in actual, instantiated objects, there's no Contact and no Lead displayed. I can't query Wario__c.Contact__c or Wario__c.Lead__c, nor can I reach (for instance) Wario__c.Contact__r.Id.

And when I look in the Workbench, the Contact__c and Lead__c fields are missing.

Workbench view of fields on Wario__c

What might be going on here? Why can't I see or query the lookup fields on this object?

  • 3
    Feels like you may not have permissions to the fields. If that is the case you won't see them or be able to query them (you won't see them via workbench either) – Sebastian Kessel May 3 at 21:56
3

Feels like you may not have permissions to the fields. If that is the case you won't see them or be able to query them (you won't see them via workbench either).

Click on the fields, then click on "Set Field Level Security" and ensure your profile can see them.

  • My Lord. We relied on an external consultant to create the object, and had a lot of problems with them. It never even occurred to me that they would have removed visibility for the admin profile... – Robert McCowen May 3 at 22:19
  • I am sorry. Those consultants exist. Come back here any time you need more help! – Sebastian Kessel May 3 at 22:20

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.