• Taro Uraoka
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Following code:
<apex:page controller="MyCustomObject__c">
    <apex:pageBlock>
        <apex:pageBlockSection>
            <apex:outputField value="{!MyCustomObject__c.RecordTypeId}"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>
I got:
User-added image
<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'm using Named Credentials with "Allow Merge Fields in HTTP Body" in Apex code.
How to include exact char sequence "{!$Credential.OAuthToken}" (avoid replaceing into OAuth token) into my request body?
 
Following code:
<apex:page controller="MyCustomObject__c">
    <apex:pageBlock>
        <apex:pageBlockSection>
            <apex:outputField value="{!MyCustomObject__c.RecordTypeId}"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>
I got:
User-added image
<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'm using Named Credentials with "Allow Merge Fields in HTTP Body" in Apex code.
How to include exact char sequence "{!$Credential.OAuthToken}" (avoid replaceing into OAuth token) into my request body?