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
}
};
pulsarBridgebridge.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)
}
}); |