+ Start a Discussion
umesh atryumesh atry 

How to get Help text value into apex.

Best Answer chosen by umesh atry
Sameer PrasonnSameer Prasonn
Hi Umesh,

In order to get help text. we need to use MetaData API for Salesforce. here i have a code snippit which explain this completely
String Field_Name=SObject.Field__c..getDescribe().getInlineHelpText();

Now you have help text with you. you can directly display it via PageSectionItem or use JavaScript/JQuery to display it where ever you want.

hope this resolve the problem. Do let me know if you need further help

All Answers

Sameer PrasonnSameer Prasonn
Hi Umesh,

In order to get help text. we need to use MetaData API for Salesforce. here i have a code snippit which explain this completely
String Field_Name=SObject.Field__c..getDescribe().getInlineHelpText();

Now you have help text with you. you can directly display it via PageSectionItem or use JavaScript/JQuery to display it where ever you want.

hope this resolve the problem. Do let me know if you need further help
This was selected as the best answer
James LoghryJames Loghry
Also, if you're attempting to display this in Visualforce, you could instead use the following merge field:  {!$ObjectType.SObjectAPIName.fields.FieldAPIName.inlineHelpText}
James LoghryJames Loghry
Yet another option, is using the <apex:inputField> element in Visualforce, which should bring in the help text / icon when using standard stylesheets.
Sameer PrasonnSameer Prasonn
Thank you James, for completing the answer adding Visual force aspects to  it. Great!!!!