function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Richard Rodriguez 1Richard Rodriguez 1 

Help with aActivating a Triggered Send using Marketing Cloud Connector

I have created a Triggered Send using Marketing Cloud Connector, but when I click the [ Activate ] button, I'm getting the following error:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client', faultstrnig:'System.NullPointerxception: Attempt to de-reference a null object

(et4ae5)',}

Any ideas?
SandhyaSandhya (Salesforce Developers) 
Hi,

Check if you have included this
 
{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")};
{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")};

https://developer.salesforce.com/forums/?id=906F000000092flIAA
 
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.

Best Regards,
​Sandhya
 
Richard Rodriguez 1Richard Rodriguez 1
Hi Sandhya,

The button is actually part of the Marketing Cloud package, so I don't have any control of it, but if you're interested in the code:
 
{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/31.0/apex.js")}
var result = sforce.apex.execute("et4ae5/jsButtonMethods","activateTriggeredSend", {trigSendId:"{!et4ae5__Automated_Send__c.Id}"});
alert(result);
var theUrl = "/{!et4ae5__Automated_Send__c.Id}";
parent.location.href = theUrl;
Richard Rodriguez 1Richard Rodriguez 1
Hi again Sandyha,

I created a new button incorporating your suggestion, but it still gave the same error.
{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")}; 
{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")}; 
var result = sforce.apex.execute("et4ae5/jsButtonMethods","activateTriggeredSend", {trigSendId:"{!et4ae5__Automated_Send__c.Id}"}); 
alert(result); 
var theUrl = "/{!et4ae5__Automated_Send__c.Id}"; 
parent.location.href = theUrl;