1

I am trying to fetch data from Data extension using C# by following this link my code is:

    ET_Client myclient = new ET_Client();
    ET_DataExtension dataextension = new ET_DataExtension();
    dataextension.AuthStub = myclient;
    GetReturn response = dataextension.Get();
    Console.WriteLine("Get Status: " + response.Status.ToString());

Here I am getting error "Must specify valid information for parsing in the string" Please help.

1
  • I'm trying the exact same and get the exact same error. A lot of other API calls work fine. I'm guessing it might be some permissions set on the app int he App Center, but I have changed them, but don't see any change. Maybe there is a delay, so I'll give it an hour or so. Nov 30, 2015 at 14:16

2 Answers 2

3

I too had the same problem as the OP.

I investigated Ajit's recommendation to set the SearchFilter and Props and discovered that only the Props need to be specified. Also if you try to specify all the properties listed on the help documentation, two of the properties will cause you issues.

  1. IsPlatformObject

Adding this prop, at the time of writing this, breaks the Name property on the returned DataExtensions prop (if you've specified it) and the Name property will be null.

  1. DataRetentionPeriod

This seems to be the culprit of the error the OP is talking about. If you include it, or if you don't specify any props, you'll get the error.

To be able to retrieve all Data Extensions, specify all but the two offending.

Like this:

ET_Client myclient = new ET_Client();
ET_DataExtension dataextension = new ET_DataExtension();
dataextension.AuthStub = myclient;
dataextension.Props = new[]
{
    "ObjectID", "PartnerKey", "CustomerKey", "Name", "CreatedDate",
    "ModifiedDate", "Client.ID", "Description", "IsSendable", "IsTestable",
    "SendableDataExtensionField.Name", "SendableSubscriberField.Name",
    "Template.CustomerKey", "CategoryID", "Status",
    "DataRetentionPeriodLength", "DataRetentionPeriodUnitOfMeasure",
    "RowBasedRetention", "ResetRetentionPeriodOnImport",
    "DeleteAtEndOfRetentionPeriod", "RetainUntil"
};
GetReturn response = dataextension.Get();
Console.WriteLine("Get Status: " + response.Status.ToString());

Hope this helps someone as it was bugging me that it doesn't work OOB like all the other objects.

0

I ran into similar problem, but if I remember correctly, I set the props I wanted to get and also filtered the results and it worked.

For example, dataextension.props = ['Name', 'CustomerKey']

See this: https://code.exacttarget.com/apis-sdks/fuel-sdks/data-extensions/data-extension-retrieve.html#csharpgetfilter

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .