Displaying list count in custom SubscriptionProvider
Hi Marcus,
We've just implemented a custom SubscriptionProvider that fetches the lists from WebCRM, and we were wondering how to display the number of subscribers in those lists, just like the builtin SubscriptionProviders, ie. "Name of list (1000)".
Does this only work for lists that exist in the db, or have we missed something somewhere?
It's really easy - just implement the ICountable-interface in your subscription provider (NewsletterStudio.Bll.Providers.ICountable).
Like this:
public class YourCustomSubscriptionProvider : SubscriptionProviderBase, ICountable { public int GetCount(string listItemValue) { // the value of listItemValue is the same as the parameter that is passed to the GetSubscribersForSendOut-method. } }
Displaying list count in custom SubscriptionProvider
Hi Marcus,
We've just implemented a custom SubscriptionProvider that fetches the lists from WebCRM, and we were wondering how to display the number of subscribers in those lists, just like the builtin SubscriptionProviders, ie. "Name of list (1000)".
Does this only work for lists that exist in the db, or have we missed something somewhere?
I have enquired on the same need at the time, would like to know how to go about it in the latest updated version.
Hi!
It's really easy - just implement the ICountable-interface in your subscription provider (NewsletterStudio.Bll.Providers.ICountable).
Like this:
public class YourCustomSubscriptionProvider : SubscriptionProviderBase, ICountable
{
public int GetCount(string listItemValue)
{
// the value of listItemValue is the same as the parameter that is passed to the GetSubscribersForSendOut-method.
}
}
Aha, that is awesome!
Thank you for the swift reply Marcus :)
is working on a reply...