1

I'm using the toolkit for .net and am making a soobjects/{type}/describe request to get the fields for a given entity. See code for "DescribeAsync" in https://github.com/developerforce/Force.com-Toolkit-for-NET/blob/master/src/ForceToolkitForNET/ForceClient.cs

What is puzzling to me is for Account, I see a field w/ name "Description" and label "Account Description". When I look in Salesforce via Customize -> Accounts -> Fields, the label is simply "Description". enter image description here

Similarly describe returns for Contact "Description" a label of "Contact Description", "Fax" is "Business Fax" and "Phone" is "Business Phone" while Salesforce proper reports "Description", "Fax" and "Phone" only.

Icing on the cake is Opportunity "Description" reports a label of just "Description" which matches what I see in Salesforce.

I appreciate any insight as to why the describe calls would return different results than I see in Saleforce proper.

1 Answer 1

1

This is one of those "special" areas for standard fields. Their labels are treated differently than custom fields.

Firstly, if it is any consolation, the labels will appear different in all the metadata queries against the field. Not just in the .NET consumption of the API.

E.g. If you try the following in Apex:

System.debug(Contact.Fax.getDescribe().getLabel());

You get:

Business Fax

So why is this so different when the Salesforce UI clearly shows just "Fax"?

enter image description here

The answer is hidden away in User Interface > Rename Tabs and Labels. If you select the edit link for Contacts and then press Next you get to this screen (I've hidden some data for clarify, but you get the idea).

enter image description here

These singular and plural labels are what get displayed in the actual UI. They also allow for translation of the values for use in other languages.

I've never actually tried to access these translated labels via the API. It looks like you can see them via the Metadata API.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .