You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Update Contact - contact not getting updated

Received Response
13
Views
3
Comments
edited Aug 4, 2017 11:35AM in Integrations and APIs 3 comments

Content

Hi,

I am trying to update the email, address and last name of a contact.

I have created a new instance of a contact and assigned ID, emails, personname to the newly created contact object from old contact (primary) which I have from database.

But the contact did not get updated with the values.

Please suggest a solution.

Code Snippet

             Contact contacttoupdate = new Contact();
                contacttoupdate.ID = primary.ID;
                contacttoupdate.Address = primary.Address;
                contacttoupdate.Emails = primary.Emails;
                contacttoupdate.UpdatedTime = DateTime.Now;
                PersonName personName = new PersonName();
                personName.Last = "Smith";
                contacttoupdate.Name = personName;

                _service.Update(clientInfoHeader, new RNObject[] { contacttoupdate }, options); 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!