02-18-2009 02:45 PM
I'm getting into some problems putting data into ACT! Contact Fields due to size limitations. Is there
a way to find out the Max size of a field?
For example, below I find the first business line1 of a contact and I then want to put a value into that field.
However, if the field is too large, this will fail. Hence, I want to limit the amount of data that goes into the field.
Dim Field_Record_Object As Act.Framework.Contacts.ContactFieldDescriptor
Field_Record_Object = ACTFM.Contacts.GetContactFieldDescriptor("TBL_CONTACT.BUSINESS_LINE1", True)
Field_Record_Object.SetValue(ACT_Contact_Item, "A very Large field ...")
I need to be able to limit the field by the max size allowed in ACT! i.e.
Field_Record_Object.SetValue(ACT_Contact_Item, strings.left("A very Large field ...", MaxFieldSize))
How do I find the Maximum Field Size? I looked at all the properties of the ContactFieldDescriptor but did no find
anything re. field size. Am I missing something?
Thanx in advance...
02-18-2009 04:07 PM
I think you're looking for...
FieldDescriptor _yourField; _yourField.Attributes[FieldProperty.Length] = new LengthAttribute(int.Parse(aString));
Pretty sure there is a 'getter' in there somewhere for the FieldProperty.Length.
I believe the same thing exists withing a ContactFieldDescriptor.
02-25-2009 12:26 PM
Thanx. I tried it and it works. Couldn't find the FieldProperty.Length definition so I reversed engineered the number (it is 1) and it worked fine then.
T