Community
Showing results for 
Search instead for 
Do you mean 
Reply

SDK (21.1) Updating contact unsuccessful

Accepted Solution Solved
New Member
Posts: 2
Country: USA
Accepted Solution

SDK (21.1) Updating contact unsuccessful

Hello,

I'm developing a simple application to read from, do some processing on the data, and then update Act! Contacts. I've had success in the past, but it seems when we updated Act!, the software stopped being able to update the contacts. (I'm not sure if this is false causality, but that's just what it seems happened.)

I'm using Act! Pro Version 21.1.187.0, Update 4.

I need some help trying to understand why the application refuses to update the contacts. I'm not getting an error (the field exists and I can read from it) but when trying to change data, it does not appear in the Act! Software. Reading from the field again shows it was never updated.

Here is the testing code I'm working with.

// c#, .net framework 4.7.2

using Act.Framework;
using Act.Framework.Contacts;

public class Test {

ActFramework act = new ActFramework();
act.LogOn(ACT_DB_LOC, username, pwd); // log in as db admin

Contact contact = ... // get a contact via contact list and finding the one we need

// reading here will be accurate to what is in the Act! software
contact.ContactFields["Contact.Address 1"] = "test field"; // any field I try does not work, custom or not // however mine ( act.Contacts.GetMyRecord() ) WILL update properly

// contact.State == Modified here contact.Update(); // contact.State == Modified here too (as opposed to Unchanged when I use my record) act.LogOff(); act.Dispose(); }

It seems to be a permissions issue, but I can't tell. Any insight would be much appreciated.

Thanks


Accepted Solutions
Solution
Accepted by topic author nsprestiandcompany
Friday
New Member
Posts: 2
Country: USA

Re: SDK (21.1) Updating contact unsuccessful

I think I may have found the issue.

Apparently, saving Contacts to variables and using them later in another scope fails. For it to update successfully, I had to save the ContactList instead and index the list whenever I wanted to access a Contact.

View solution in original post


All Replies
Solution
Accepted by topic author nsprestiandcompany
Friday
New Member
Posts: 2
Country: USA

Re: SDK (21.1) Updating contact unsuccessful

I think I may have found the issue.

Apparently, saving Contacts to variables and using them later in another scope fails. For it to update successfully, I had to save the ContactList instead and index the list whenever I wanted to access a Contact.