You need to sign in to do that
Don't have an account?
Taro Uraoka
How to get "Record Type" (Not "Record Type ID") as label of RecordTypeId field in Apex or REST API
Following code:
<apex:outputField> put "Record Type" as label of RecordTypeId field.
And I want to reproduce this by Apex Describe Information or REST API, because I want to build page dynamically.
Account.MyCustomObject__c.RecordTypeId.getDescribe().getLabel() returns 'Record Type ID'.
SObject Describe endpoint ( /services/data/v41.0/sobjects/MyCustomObject__c/describe ) responds "Record Type".
How can I get "Record Type" (Not "Record Type ID") ?
<apex:page controller="MyCustomObject__c"> <apex:pageBlock> <apex:pageBlockSection> <apex:outputField value="{!MyCustomObject__c.RecordTypeId}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:page>I got:
<apex:outputField> put "Record Type" as label of RecordTypeId field.
And I want to reproduce this by Apex Describe Information or REST API, because I want to build page dynamically.
Account.MyCustomObject__c.RecordTypeId.getDescribe().getLabel() returns 'Record Type ID'.
SObject Describe endpoint ( /services/data/v41.0/sobjects/MyCustomObject__c/describe ) responds "Record Type".
How can I get "Record Type" (Not "Record Type ID") ?
I found solution: