3

We're building a mobile app that uses Salesforce metadata retrieved through the REST API. One of the pieces of metadata we need are field labels, in the authenticated user's language.

For example, we want to display the Account Record Type (RecordType.Name) so the label should be "Account Record Type" if the user's language is English or "Tipo de registro de cuenta" if the user's language is Spanish. These are the labels shown in the web interface:

english account record type spanish account record type

The problem is that the REST API returns the label as "Record Type ID" or "Id. de tipo de registro" when describing the Account object:

enter image description here

Other standard lookup fields have a similar problem. "Parent Account" is "Parent Account ID" from the API.

Custom lookup fields don't have this problem. The label in the UI matches the label in the API.

Any suggestions for getting the correct label?

  • Looks like you want the relationship name rather than the field that maintains the relationship. I'll see if I can find the label for the relationship. – Daniel Ballinger Nov 13 '12 at 21:25
  • The correct labels are available from the describeLayout method in the SOAP API, but in this case, we want to use the field in a "list view"-type screen, and it should work even if the field is not on any page layouts. – xn. Nov 13 '12 at 21:33
1

There doesn't currently appear to be an equivalent REST API to the SOAP API describeLayout method. Without it I don't think you can get the information you want.

(Happy to be proven wrong by someone on this).

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.