Search

Showing posts with label Salesforce ObjectType Visualforce page. Show all posts
Showing posts with label Salesforce ObjectType Visualforce page. Show all posts

Tuesday, 16 August 2011

Using ObjectType

You can use ObjectType to easily display certain information on VF pages

The general format is
{!$ObjectType.<<object>>.<<field>>.<<property>>}

Display the plural text of an object
{!$ObjectType.Task.LabelPlural}

Display the 1st part of an object records id
{!$ObjectType.Task.KeyPrefix}

Display the length of a field
{!$ObjectType.Task.Fields.Await_Call_Back_Time__c.Length}

Display the help text of a field
{!$ObjectType.Task.Fields.Await_Call_Back_Time__c.InlineHelpText}

Display the data type of a field
{!$ObjectType.Task.Fields.Await_Call_Back_Time__c.Type}

Display the label of a field
{!$ObjectType.Task.Fields.Await_Call_Back_Time__c.Label}

Also for field sets
http://www.salesforce.com/us/developer/docs/pages/Content/pages_dynamic_vf_field_sets.htm