1

Im currently trying to use the Salesforce SOAP API to update a query activity but it seems to fail when trying to update. It works fine creating a Query Activity though.

The error message isn't very description it says:

Exception occurred during [UpdateQueryDefinition] ErrorID: 101260839

Please see my code below:

$client = new ExactTargetSoapClient($wsdl, array('trace'=>1));

/* Set username and password here */
$client->username = 'username';
$client->password = 'password';

$qd = new ExactTarget_QueryDefinition();
$qd->ObjectID = 'Query External KEY';
$qd->TargetUpdateType = "Overwrite";
$qd->TargetType = "DE";
$qd->QueryText = "SELECT * FROM ent.Active";

$ibo = new ExactTarget_InteractionBaseObject();
$ibo->CustomerKey = 'Target DE External Key';
$ibo->Name = 'Target DE Name';
$qd->DataExtensionTarget = $ibo;


$object = new SoapVar($qd, SOAP_ENC_OBJECT, 'QueryDefinition', "http://exacttarget.com/wsdl/partnerAPI");
$request = new ExactTarget_UpdateRequest();
$request->Options = NULL;
$request->Objects = array($object);
$results = $client->Update($request);
1

I found the answer, the External key of the query activity IS NOT the Object ID. I found the object ID in the url when editing the query.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.