Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: sendRequest to send

...

Code Block
languagejs
var request = { 
    "type"   : "getRTFImages",
    "object" : "Some_Custom_Object__c", // Required: the object type
    "data"   : {
        // Required: Record Id for the object containing the Rich Text images fields
        "Id"     : "0011000000iW9YuAAK",
        // Required: list of specific fields to retrieve.
        "Fields" : [ "RichText_Field1__c", "Rich_Text_2__c" ]
    }
};
pulsarBridgebridge.sendRequestsend(request, function (result) {
   if (result.type === 'getrtfimagesResponse') {
      var response = result.data; // this will be a dictionary of field->RichTextContent pairs
      alert('RichText_Field1__c content: ' + response['RichText_Field1__c']); 
      alert('Rich_Text_2__c content: ' + response['Rich_Text_2__c']); 
   }
   else {
      console.log('getrtfimages failed: '+ result.data) // data is an error string
   }
});

...