You can retrieve this using the Tooling API by using the externalDeveloperName
attribute of the Metadata
returned from:
/services/data/v39.0/tooling/sobjects/CustomField/[your field id]
Alternatively, if you don't know the field ID you can use the query endpoint,the only issue with this is that if you want to return the Metadata
field you must ensure that your query only returns a single result, so you'll probably want to filter on TableEnumOrId
as well as the DeveloperName
of your field:
/services/data/v39.0/tooling/query?q=SELECT+Metadata+FROM+CustomField+WHERE+DeveloperName=[your field API name]+AND+TableEnumOrId=[your table enum/id]
Example response:
{
"size" : 1,
"totalSize" : 1,
"done" : true,
"queryLocator" : null,
"entityTypeName" : "CustomField",
"records" : [ {
"attributes" : {
"type" : "CustomField",
"url" : "/services/data/v39.0/tooling/sobjects/CustomField/00N0Y00000ByqwZUAR"
},
"Metadata" : {
"caseSensitive" : null,
"customDataType" : null,
"defaultValue" : null,
"deleteConstraint" : null,
"deprecated" : null,
"description" : "icon",
"displayFormat" : null,
"displayLocationInDecimal" : null,
"encrypted" : null,
"escapeMarkup" : null,
"externalDeveloperName" : "icon",
"externalId" : false,
"formula" : null,
"formulaTreatBlanksAs" : null,
"inlineHelpText" : null,
"isConvertLeadDisabled" : null,
"isFilteringDisabled" : false,
"isNameField" : false,
"isSortingDisabled" : false,
"label" : "icon",
"length" : 255,
"lookupFilter" : null,
"maskChar" : null,
"maskType" : null,
"metadataRelationshipControllingField" : null,
"populateExistingRows" : null,
"precision" : null,
"readOnlyProxy" : null,
"referenceTargetField" : null,
"referenceTo" : null,
"relationshipLabel" : null,
"relationshipName" : null,
"relationshipOrder" : null,
"reparentableMasterDetail" : null,
"required" : false,
"restrictedAdminField" : null,
"scale" : null,
"startingNumber" : null,
"stripMarkup" : null,
"summarizedField" : null,
"summaryFilterItems" : null,
"summaryForeignKey" : null,
"summaryOperation" : null,
"trackFeedHistory" : null,
"trackHistory" : null,
"trackTrending" : null,
"type" : "Text",
"unique" : false,
"urls" : null,
"valueSet" : null,
"visibleLines" : null,
"writeRequiresMasterRead" : null
}
} ]
}
externalDeveloperName
from CustomField metadata maybe?