Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Change length in a Contact field

$
0
0

Hi

I need to change the max length for a field in Contact. The field is a string...

I tested this.

using (MetaClassManagerEditScope scope = DataContext.Current.MetaModel.BeginEdit("Contact", AccessLevel.System))
            {
                MetaFieldCollection fields = DataContext.Current.MetaModel.MetaClasses["Contact"].Fields;
                var fieldToChange = fields["MyField"];
                fieldToChange.Attributes["MyField"] = 4000;
                scope.SaveChanges();
            }

But didnt work. Checked the field in DB in table cls_Contact and the length is the same as before.

Do I must to change it manually?


Viewing all articles
Browse latest Browse all 8020

Trending Articles