+ Start a Discussion
SeAlVaSeAlVa 

How to obtain the Field ID using apex?

Hi all, 

 

I know that it is possible to pre-populate fields by adding some parameters to the URL.

 

What I need is to retreive the Field ID to be able to pre-populate any field I want knowing the Object name and the field name.

 

Is it possible?

 

How?

 

Thank you in advance.

Best Answer chosen by Admin (Salesforce Developers) 
r1985r1985

Hi,

 

There is no way to get the field id through apex. For prepopulating the fields u can create custom settings with the field id values and then u can use that in apex.

 

 

 

Thanks,

MVP