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
Arnav Ray 1Arnav Ray 1 

How to retrieve description value of custom field using apex code????

I am trying to create a class where I can extract the custom field per sobject but i am not able to do so as I am not getting any option to retrieve description field specifically. Rest of the details i can extract using the following method:-

https://blog.jeffdouglas.com/2011/10/20/getting-salesforce-field-metadata-the-easy-way/

Can someone please provide any working code for this?
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi arnav,

This is not possible.In DescribeFieldResult methods ,there is no method like getdescription() to  retrieve description of the field.
Please refer below link which has the list of methods which are used for describing sObject fields.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_fields_describe.htm
https://salesforce.stackexchange.com/questions/14158/how-to-get-a-fields-description-via-api

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards
Arnav Ray 1Arnav Ray 1
Hi Devi,

I was just hoping to there might be some way to do so....Even in app exchange i didnt found any app to retrieve meadata that includes description field. If anyone finds it please post you findings here.....

Thanks ...