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
jpushpanjpushpan 

how to find fieldid of an object

Does any one know a way of finding the fieldid of an object programatically?

 

Ex: I have an Account object and I want to find the fieldid of Account.ParentID. 

 

cheers,

Jackson

krishnagkrishnag

you can find it in the URL of the page where te record is opened.Its a alpha numeric character combination.

 

for example

 

https://zurich--krishna.cs3.my.salesforce.com/003Q000000D4hHA

 

 

in theabove URL   "003Q000000D4hHA"  is the URL and its a record Id

 

I dont think there are no field ID as of my knowledge.

krishnagkrishnag

since you are referring to lookup field record id will be the field id in this case.

jpushpanjpushpan

Thanks krishnag.

 

I am new to salesforce development, so apologies if this is not possible.

But I am trying to find a way to get this id programatically.

Ex: My scenario is, I have a company object  which has an Account.ParentID built to it and I need to find the field id so I could do some manipulation programatically.

 

Cheers,

Jackson.

 

MarcSMarcS
Such a possibility would be extremely helpful.
krishnagkrishnag

can u tell me what kind of operation u want to do on lookupfield Account.parentID

krishnagkrishnag

try using the name "parent " as field name in programming. THw field name we can use programmatically should be API name in case of standard fields and in case of standard fields we should use field name.I f you want to find the fiield name of a field.got to AppSetup --->  Customoze ---->  Accounts ---->fields --->click on the filed which u wnat to find field name.

 

u will see the field name of the id there.

 

hope this will help you

 

cheers