Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Added column in system table for Newsletter doesn't quite work View modes: 
User avatar
Member
Member
ryan.andrianto-worldvision.com - 7/13/2009 1:01:26 AM
   
Added column in system table for Newsletter doesn't quite work
Hi all,

I'm trying to add an extra field (state) to newsletter subscribe webpart.
So I've added the extra column to dev > webpart > newsletter and to the system tables > newsletter-subscriber.

Now i can see the new added state field which is a dropdown box on the subscription list. I can modify them and save them. But the part that doesn't quite work yet is when i'm trying to save the value from the webpart. It seems that the subscriber object doesn't recognise the new field (state) that i've been added to the system table.

below is the piece of code that i'm working on



sb = new Subscriber();

//this sb object complain that it doesn't recognise SubscriberState (new field that
// i've added through systemtables)

sb.SubscriberState = txtState.Text;



I don't know if i'm missing something or it's actually a bug
Any help will be appreciated. THX

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/14/2009 3:17:03 AM
   
RE:Added column in system table for Newsletter doesn't quite work
Hello,

your custom fields may not be properties of the default classes I hope you understand why. You need to access them by GetValue and SetValue methods.

sb.GetValue(columnName);
sb.SetValue(columnName, value);


Best regards,
Helena Grulichova