function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jean Grey 10Jean Grey 10 

How do I find the name of a custom field? I have the API id but don't know what field it's referring to.

One of our templates is referencing a field with {!Opportunity.someid} and I'm not sure what field the id is referring to. How do I search for this field name by the id?
Maharajan CMaharajan C
I think its looks like a some look up field in Opportunity object.

Ex: 
{!Opportunity.CampaignId} -> Primary Campaign Source
{!Opportunity.AccountId}-> Account Name

Go and check in Setup->Opportunities->fields->Ctrl+f->type as lookup in search box ->then try to find.

If the above things dont work then please tell me the Correct API name of your field?

Thanks,
Raj
venkat-Dvenkat-D
You can check like this String objectAPIName = someId.getSObjectType().getDescribe().getName(); in your code or check in anonymous block and you should get the name of the object of id.