More in this section

Forums / General Discussions / Adding custom fields to newsletters subscribers

Adding custom fields to newsletters subscribers

2 posts, 0 answered
  1. Craciunescu
    Craciunescu avatar
    2 posts
    17 Jan 2013
    02 May 2013
    Link to this post
    I tried adding custom field to a subscriber.
    I used this code:
    var metaMan = MetadataManager.GetManager();
    var dynType = metaMan.GetMetaType(typeof(Subscriber));
    if (dynType != null)
    metaMan = MetadataManager.GetManager();
    dynType = metaMan.CreateMetaType(typeof(Subscriber));
    var metaField =  metaMan.CreateMetafield('Token');
    metaField.DBSqlType = "NVARCHAR(150)";
    metaField.DBType = "LONGVARCHAR";
    metaField.ClrType = "System.String";

    I checked the database, and the field is there, i populated this field with data, but I can't retrieve values.
    I tried with {|Subscriber.Token|} in message template, but is empty every time.

    Please help,
  2. Pavel Benov
    Pavel Benov avatar
    341 posts
    14 Mar 2016
    06 May 2013
    Link to this post
    Hello Stefan,

    This is a duplicated forum thread. You have been given an answer in the initial thread here.

    All the best,
    Pavel Benov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered