Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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 Id will take precedence
    RecordTypeId: '012000000000000AAA', // Optional: default Id is shown here
    RecordTypeName: 'Business_Contact', // Optional: RecordType Developer Name
    ObjectType: 'Contact', // Required: SObject unique name
  }
};
pulsarBridge.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)
  }
});
  • No labels