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
AlexPHPAlexPHP 

How can I get an object FIELD's id?

Hi guys

 

I want to obtain an object field's ID.  This is the ID that identifies a particular field within an object.

 

I can see it in the URL link when I click on the field in the Setup, but is there a way to get it programmatically?  

 

I don't see it in the metadata that I get through the Force.com IDE.

 

Thanks

Ankit AroraAnkit Arora

Only way to get native field's Id is by : Right Click on field and check it in view source.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

AlexPHPAlexPHP

Ankit

 

No, I'm sure there's a way to do it via the Metadata API, just having a hard time finding the solution.

Raumil SetalwadRaumil Setalwad

Hi Friend,

I think the prolem to your solution is describe methods which can be used for getting field id of the object using following describe methods

 

1) describeGlobal()

2) describeSobject()

3) describeSobjects

 

 

 

I don't know exactly how to use it but this could solve your problem

 

Also refer the link:

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describeglobal.htm

Hope this Helps