Community
Showing results for 
Search instead for 
Do you mean 
Reply

Contact update after new

New Member
Posts: 9
Country: United States

Contact update after new

So here is the problem we are having and the steps to reproduce it -

 

1)  Person adds a new contact and enters all the information

2)  Person then selects a menu option that starts to modify the contact

 

Problem -

The code cannot modify the contact and as soon as it does, it crashes.  Restarting shows that the contact has never been entered.  It appears as if the contact must be saved prior to working on it.  We tried RefreshLoadedViews, but still the same problem.

 

The same problem exists if we modify the contact then select the menu option.  The only way this works is if there are no modifications to the record and the record is not new.

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Contact update after new

Check the IsNew or HasChanges property on the current contact. If set to true then update (save) the contact

 

ACTAPP.ApplicationState.CurrentContact.HasChanges

ACTAPP.ApplicationState.CurrentContact.IsNew

 

// Save

ACTAPP.ApplicationState.CurrentContact.Update()

 

 

-- Jim Durkin