0

I have an Object which is deployed using Managed Package in my Org. Here is the object (Name Changed):

Object

API name of the custom object is res__Accs__c. Now when I tried to get the plural lable of the object in apex class as res__Accs__r, I am seeing an error that the API name is incorrect.

Can anyone please let me know how to get the Plural API name of Custom Object which is deployed using Managed Package

1 Answer 1

1

You object name should be extracted from Object Name field in your image.

So it should be res__Accs__c and res__Accs__r and not the field label and plural labels.

Both field label and plural labels are generally available when configuring Custom object tabs.

enter image description here

From Setup --> Quick Find --> type packages

enter image description here

8
  • even using res__Accs__r as my plural label, I am seeing the same error. As this is a managed Pacakge object, do i need to add any prefix to the API name?
    – SFDCUser
    Jul 2, 2021 at 6:25
  • Yes you should prefix the package namespace before the custom object API Name. Jul 2, 2021 at 6:26
  • I know this may sound silly, but could you please let me know how to find the namespace of the package which is used to deploy this?
    – SFDCUser
    Jul 2, 2021 at 6:35
  • @SFDCUser I added images to my comment above. Check it out. Jul 2, 2021 at 6:47
  • I am finding this strange. 'res' is the namespace of the package and I am using res__Accs__r in the query and I am still seeing the error. Wondering what is missing in the API name
    – SFDCUser
    Jul 2, 2021 at 6:54

You must log in to answer this question.

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