Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
New Member
bobberino1
Posts: 7
Country: USA
Message 1 of 4 (1,031 Views)

2010 Act Premium - SDK - Fields not updating immediately

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

 

 

 

 

Please use plain text.
Employee
mwood
Posts: 1,163
Country: USA
Message 2 of 4 (980 Views)

Re: 2010 Act Premium - SDK - Fields not updating immediately

[ Edited ]

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.

Matthew Wood
Act! SDK Support
Community Moderator
Please use plain text.
Platinum Elite Contributor
GLComputing
Posts: 13,903
Country: Australia
Message 3 of 4 (946 Views)
Please use plain text.
New Member
bobberino1
Posts: 7
Country: USA
Message 4 of 4 (883 Views)

Re: 2010 Act Premium - SDK - Fields not updating immediately

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

Please use plain text.