How to retrieve an Exact Target Email?
I followed from the sample here:
and I have the below code:
var retrieveRequest = new RetrieveRequest();
retrieveRequest.ObjectType = "Email";
retrieveRequest.Properties = new []
{
"ID","Name"
};
// add the filter
var simpleFilterPart = new SimpleFilterPart
{
SimpleOperator = SimpleOperators.equals,
Property = "Name",
Value = new[] { "EmailTemplateTest1" },
};
retrieveRequest.Filter = simpleFilterPart;
APIObject[] apiObjects;
string requestId;
var result = this._soapClient.Retrieve(retrieveRequest, out requestId, out apiObjects);
But when it runs, the "result" variable contains the below error message:
**Error: Invalid column name 'Name'.
Invalid column name 'EmailTemplateTest1'.**
"Name" is a column name for my Email Template whose name is "EmailTemplateTest1".
Not sure what could be wrong? the column names and values look fine to me.
Should I be specifying the Folder path (e.g. Folder1/Folder2/Folder3) in which the email template is located? if so, how?
Any thought?
thanks
I have been struggling with the ExactTarget
soap api as well. The only way I have been able to retrieve an email is by setting :
retrievRequest.QueryAllAccounts = true
retrievRequest.QueryAllAccountsSpecified = true