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
csbaacsbaa 

Field Salesforce ID

Hello Helper

I am curious  if is possible  to retrieve the Salesforce ID of a field  of a custom object  throught apex  code (not metadata API)


Regards
csaba
SFDC_DevloperSFDC_Devloper
Hi,

<pre>String orgId = UserInfo.getOrganizationId();</pre>
csbaacsbaa
Hello

I  think this is not what I am looking for

I am not interested in the Organisation Id

for exampem I woud like to know  what is the SalesforceId of the field  "Name"  on the "Account"   object  for  example

Or

SalesforceID  of any  field  of any custom  object  in an org


Regards
Csaba 

   
Rahul_sgRahul_sg
not sure what your actual requirment is , see if this link helps https://developer.salesforce.com/forums?id=906F00000008wORIAY
SFDC_DevloperSFDC_Devloper

Hi,

Hope this link help you:

http://community.magicsoftware.com/en/library?book=en/Magicxpi/&page=Salesforce_-_Referencing_Objects_By_IDs.htm (http://community.magicsoftware.com/en/library?book=en/Magicxpi/&page=Salesforce_-_Referencing_Objects_By_IDs.htm)
 

RavisfdcRavisfdc
Hi,
I generally create custom settings to store Ids of fields and use custom settings in Apex whereever you want.

Thanks,
Ravi