09-04-2010 05:27 AM
Hi Dear ,
I want to change current contact state with other contact(Randomly like current contact state is 10 number record, now I want to reach 50 number record )? is it possible or not? by programing or code.
How can do this please tell to me.
SAKET DWIVEDI
SNS SYSTEM ,INDORE
09-07-2010 07:15 AM
It's certainly possible to change the current contacts state with the state of another contact. I'm assuming you know how to capture both the current contact and the other contact your wanting to use to set the current ones state. From there we just need to capture the field descriptor for the state field:
DBFieldDescriptor StateField = _ActApp.ActFramework.Contacts.GetContactFieldDescriptor("STATE", Act.Framework.MutableEntities.FieldNameType.Alias);
Then all we have to do is call the SetValue method for this field descriptor and use the values from our contacts. If you prefer to capture the states as a string you can do so like:
string contactState = contact.Fields["STATE", Act.Framework.MutableEntities.FieldNameType.Alias].ToString();