jump to navigation

I’ve got my helmet on June 11, 2008

Posted by mmoriar1 in Uncategorized.

Man, they’ve got me running through walls over here. πŸ™‚ Two issues have come up in the last week or so, both of which are unresolved and can be found here:


If those pages are inaccessible, the issues are:

  • When creating a subscriber using the WebServices API, setting their EmailTypePreference to HTML or Text will always result in the creation of a subscriber with a preference of HTML.
  • The Describe call does not grab custom preferences from a user’s account. The Retrieve call does, but if there is no previous subscriber to retrieve, then we cannot get custom preferences using the Web Services API.

Aside from that, I’ve made some significant progress on the Subscriber pages. This progress includes completion of basic functionality of the create, update, delete, and retrieve pages, and the completion of more advanced aesthetic functionality on the create page. To sum up this aesthetic functionality, I present the following:

  • The default values of each attribute are loaded into their proper fields
  • The required attributes are denoted as such by a ‘*’ next to their names
  • The hidden attributes aren’t displayed on the page
  • If an attribute has a picklist of items to choose from, then the items are loaded into a drop down list with the default item initially selected
  • Each field’s data requirements are shown to the user if there is no default value (for example, if the field was “Birthday” then the corresponding text box would be populated with “Enter a date (DD-MM-YYYY)”
  • The hidden source code panel was filled with a text area with some text in it just to see how it looked. Until I figure out how to style it, that’s how it will stay (the style seems to not want to work correctly).

The create page will be complete once the two issues are resolved and I implement checkboxes into the repeaters. Here you can see the create page:

My attention for today will be solely placed on making the update page look like the create page. The update page is functional, but it needs a little bit more TLC.

Two and a half major issues which cost me a bunch of time over the past few days included the following:

  • When populating a new (uncreated) subscriber’s attributes array, you have to instantiate each attribute.This won’t work (will throw exception):new_sub.Attributes[i].Name = name
    new_sub.Attributes[i].Value = value
    This is the fix:com.exacttarget.webservice.Attribute att = new com.exacttarget.webservice.Attribute();
    att.Name = name;
    att.Value = value;
    new_sub.Attributes[i] = att;
  • When trying to fill a drop down list control inside of a repeater, consult google πŸ™‚ Here’s what resources I used:

    I found that the binding of the drop down list to the list of items that is to populate it has to be done in the repeater’s ItemDataBound event. Basically what I did was in the describe I found out which attributes had picklists and then created an arraylist of DictionaryEntries (key-value pairs) of these attributes. The key of each DictionaryEntry was the name of the attribute and the value was another arraylist filled with the picklist items. Then, in the repeater’s ItemDataBound event, I bound each drop down list created to an arraylist of picklist items.

    The ItemDataBound event was created as such:
    this.Repeater.DataSource = pick_list;
    this.Repeater.ItemDataBound += new RepeaterItemEventHandler(Repeater2_ItemDataBound);

    Then I created a function:
    private void Repeater2_ItemDataBound(object source, RepeaterItemEventArgs e)
    if (e.Item.ItemType == ListItemType.AlternatingItem ||
    e.Item.ItemType == ListItemType.Item)
    bind drop down list here…

    That took awhile to figure out.

  • The half issue which took awhile to debug was that in the update/retrieve calls, I was forgetting to set my SimpleFilterPart to the RetrieveRequest, which meant that it just kept retrieving ALL of the subscribers and displaying the first one that it got instead of filtering out all of the subscribers except for the one I was retrieving/updating.

So that’s pretty much it, if I think of anything else that came up I’ll post about it.

All for now,




No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: