1

I am looking for a way to add additional metadata to object fields for use by some Salesforce and non-Salesforce UI code. What I need is a small piece of custom JSON per field. (Yes I could create a separate custom API to deliver this data.)

The "Description" looked like a candidate place to put the JSON, but that is not exposed in e.g. these APIs:

/services/data/v46.0/sobjects/Account/describe

/services/data/v46.0/ui-api/record-ui/a0F2F000002BhtV

I could add the info on the end of the "Help Text" (inlineHelpText) but would then need to strip that off.

Is there an API that returns the "Description" of a field along with the rest of the field metadata?

2

I'm not aware of such an API, or any other way of extending standard metadata like this. I think you might be forced into:

  • Storing the values you require as some Custom Metadata Type, with a 'Key' field that holds the Object and Field API names for querying.
  • Storing the values in some global utility class, with each JSON string being a value in a Map of <String, String> where the key is Object + Field API name.
  • Thanks Dan, yep I think I'm stuck. – Keith C Nov 16 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.