08-04-2010 12:53 PM
Hi,
I'm using Act 2010 Premium with SDK and I'm trying to get the values of the contact fields after they're updated. The fields aren't updated until I click on a company and then a contact within that company and then return to the original contact that has been changed.
Contact contact = application.ApplicationState.CurrentContact;
contact.Update();
Act.Framework.MutableEntities.MutableEntity.FieldCollection contactFields = contact.Fields;
string newCompanyName = Convert.ToString(contactFields["Contact.Company", false]);
the newCompanyName retains the old value until the steps taken above..
Can anyone help or point me in the right direction?
Bob
08-04-2010 01:57 PM - edited 08-04-2010 02:02 PM
Rather than forcing an update for the current contact you could monitor the Contact_Updated event and make the changes at that point. Another option could be to do the same with except with the FieldChanged event which occurs after changing a field then leaving for another.
Also how are you setting the field value? .SetValue?
Hope this helps.
08-04-2010 03:13 PM
08-10-2010 09:28 AM
No, not changing the fields via SDK. Just trying to obtain the values using the SDK.
I found a solution. I couldn't use application.ApplicationState.CurrentContact to get the updated values so I used
private ActFramework ACTFM;
ContactList
contactList = ACTFM.Contacts.GetContactsByID
as long as I click the save button, I could get the most updated values.
I hope that helps anyone researching this in the future