Overriding Inline Help-Text/Getting Field Description from Apex

I have a requirement . I need to be able to add descriptions to fields in our managed package which we can reference from Apex code and display on a VisualForce page.

Currently, Inline help-text which is added and packaged with fields on custom objects does not get added to an Org when updating the package. Instead, whatever help-text was previously present for those fields remains. When we change the help-text and update our package and install it into an Org, we need to be able to override the help-text which was previously in the Org. Is there any way to do this?


I share your pain at this behaviour; it would be entirely reasonable in my mind to make preserving or overwriting local changes an install time option.

Perhaps there are 3rd party tools that can help.

A “build your own” solution could be to write Apex code that goes through the fields in your custom objects via describe calls (in the org you package in) and uses getInlineHelpText to build some JSON that holds the help text values for each field in each object. Include that JSON in your package as a static resource.

Then add a page (as a safer approach than trying to do this in an InstallHandler) that uses the Apex Wrapper Salesforce Metadata API to update the help text in the orgs that are being upgraded taking the data from the JSON. Then tell you customers to run that page.

Source : Link , Question Author : cloudy-ritz , Answer Author : Keith C

Leave a Comment