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 Schema Metadata

Pulsar can provide Salesforce sObject Describe metadata using the getSobjectSchema API. This includes database-level descriptive information about the Salesforce object and it’s fields. The response is a string that matches the DescribeSObjectResult JSON format from salesforce, and it must be parsed in order to be used as a javascript object.

Example:

var request = {
    type: 'getSobjectSchema',
    object: 'Account', // Required: SObject unique name 
    data: { } // empty     
};
bridge.sendRequest(request, function (result) {
   if (result.type === 'sobjectschemaResponse') { // case-sensitive
      var describeLayoutJSON = result.data; // you must parse this JSON string 
      var describeLayout = JSON.parse(describeLayoutJSON); 
      //....
   }
   else {
      console.log('error: '+ result.data)
   }
});

  • No labels