/
Compact Layout Information
Compact Layout Information
Retrieving Compact Layout Metadata
Pulsar can provide Salesforce Compact Layout information using the getCompactLayoutFields API. The response is an array of field names that exist on the selected object’s compact layout. The parameters are the same as the getLayout API, with an additional required parameter for the ObjectType
Example:
var request = {
type: 'getCompactLayoutFields',
object: 'Contact',
data: {
// The following two parameters are both optional, and only one is needed
// to specify the RecordType, though if both are specified,
// the RecordTypeName will take precedence
RecordTypeId: '012000000000000AAA', // Optional: default Id is shown here
RecordTypeName: 'Business_Contact', // Optional: RecordType Developer Name
ObjectType: 'Contact', // Required: SObject unique name
}
};
bridge.sendRequest(request, function (result) {
if (result.type === 'getCompactLayoutFieldsResponse') { // case-sensitive
var layoutFields = result.data;
// Example results:
// [
// "Name",
// "Email",
// "Phone",
// "MobilePhone",
// "Title"
// ]
//...
}
else {
console.log('error: '+ result.data)
}
});
Related content
Object Layout Information
Object Layout Information
More like this
List View Metadata
List View Metadata
More like this
Picklist Information
Picklist Information
Read with this
Object Schema Information
Object Schema Information
More like this
Pulsar Platform - JS Bridge API
Pulsar Platform - JS Bridge API
More like this
Pulsar Configuration API
Pulsar Configuration API
More like this