...
Pulsar can provide Salesforce Describe Layout metadata using the getLayout API. The response is DescribeLayout JSON object string .an object (Pulsar 12.0+) or JSON string (Pulsar 11.0 or lower) representing the DescribeLayoutResult from Salesforce
Example:
Code Block | ||
---|---|---|
| ||
var request = { type: 'getLayout', object: 'Account', // Required: SObject unique name data: { // The following two parameters are optional, and only one is needed // to specify the RecordType, though if both are specified, // the RecordTypeName will take precedence RecordTypeId: '012000000000000AAA', // Optional: Id of the RecordType RecordTypeName: 'Business_Account', // Optional: RecordType Developer Name } }; bridge.sendRequest(request, function (result) { if (result.type === 'layoutResponse') { // case-sensitive var describeLayoutJSONdescribeLayoutObject = result.data; var describeLayout = (typeof describeLayoutObject === 'string') ? JSON.parse(describeLayoutJSONdescribeLayoutObject) : describeLayoutObject; //.... } else { console.log('error: '+ result.data) } }); |
...
Pulsar can provide Salesforce Describe Layout section information using the getLayoutSections API. The response is an array of section dictionaries that exist within the selected layout. The parameters are the same as the getLayout API, with an additional parameter to select the mode (“edit” or “display”).
...
Pulsar can provide Salesforce Describe Layout field data using the getLayoutFields API. The response is a flattened array of field dictionaries that exist on the selected layout. Note that layout fields with subcomponents will exist alongside the subcomponent fields themselves. The parameters are the same as the getLayout API, with an additional parameter to select the mode (“edit” or “display”).
...