Find your content:

Search form

You are here

Getting Labels for Standard Lookup Fields from API

 
Share

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?


Attribution to: xn.

Possible Suggestion/Solution #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).


Attribution to: Daniel Ballinger
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4366

My Block Status

My Block Content