1

I am trying to clear a data extension via API call. I have ExactTarget web service reference into my project as https://webservice.exacttarget.com/etframework.wsdl

I have found a sample code to clear a data extension via API call at here on ET website:

http://help.exacttarget.com/en-US/technical_library/web_service_guide/technical_articles/clearing_data_from_a_data_extension/

I have tried using the sample code provided on ET website, but I am getting an error resolving this reference:

ExactTarget.Integration.IPartnerFrameworkInterface proxy = null;

Can someone please explain how to resolve this reference? My full code can be seen in this image.

enter image description here enter image description here enter image description here

0

i guess you are missing some using statements using ProfileCenter.ExactTarge.?? ?

0

That example wraps some of the objects a bit which makes things a bit confusing. Simplified specifically for WCF, it would look like:

public void ClearDE()
{
    SoapClient api = new SoapClient();
    api.ClientCredentials.UserName.UserName = "ccc";
    api.ClientCredentials.UserName.Password = "ccc";

    string requestID;
    string status;
    string statusmessage;

    DataExtension DE = new DataExtension();
    DE.ObjectID = "a23790c3-88c0-4f08-a253-1024d9e74a2c";

    PerformResult[] presult = api.Perform(new PerformOptions(), "ClearData", new APIObject[] { DE }, out status, out statusmessage, out requestID);

    foreach (PerformResult result in presult)
    {
        Console.WriteLine(result.StatusMessage);
    }
    Console.WriteLine(requestID + ": " + status);
}

Keep in mind, this function only works for Enterprise 2.0 accounts so please verify that is the account type being used.

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.