Newer Version Available

This content describes an older version of this product. View Latest

describeCompactLayouts()

Retrieves metadata about compact layouts for the specified object type.

Syntax

Usage

Use this call to retrieve information about the compact layout for a given object type. This call returns metadata about a given compact layout, including the record type mappings. For more information about compact layouts, see the Salesforce online help.

Sample Code—Java

This sample shows how to get the compact layouts of an Account sObject. It calls describeCompactLayouts() with the name of the sObject type to describe. After getting the compact layouts, the sample prints the images, fields, and action buttons found for each compact layout. Next, it prints the system default compact layout for the object, then the mapping information of record types to compact layouts.

Arguments

Name Type Description
sObjectType string The specified value must be a valid object for your organization. If the object is a person account, specify Account, or if it is a person contact, specify Contact.
recordTypeId ID[] Optional parameter that restricts the compact layout data returned to the specified record types.