Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone
Accepted Solution

Update Contact failed

just trying some things with Contacts

 

having trouble to update a Contact

at first tried to add custom attributes, but it failed

then did something simple like:

if (contact.id()) {
builder = contact.edit();
builder.addAttribute(
    ContactAttributeBuilder().setKind(AttributeKind::Phone)
    .setSubKind(AttributeSubKind::Home).setValue("080311234567890"));
Contact updatedContact = ContactService().updateContact(builder);

Contact was not updated

 

getting an error from logging that the Account wasn't found

updateContact called with account id  4   contact id:  6 
PUT   
URL Buffer: http://127.0.0.1:8888/contact/4/6 
Curl Easy perform 
Curl Easy GetInfo response code 
Curl easy getInfo content_length_download 
Curl Error Code 0 
Response Code 404 
Status Code 404 
Exception String The account was not found 
Error occurred! Investigate!  updateContactHelper  L 372

 any idea ?

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: Update Contact failed

good news:

 

January OS / SDK Update fixed this.

Now I can update the Contacts as expected.

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 107
Registered: ‎06-12-2012
My Device: Dev Alpha C, Playbook
My Carrier: Loop

Re: Update Contact failed

Hi,

I am also getting similar errors. Please let me know how to verify if I have the latest SDK.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Developer
Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: Update Contact failed

[ Edited ]

Check Help -> Update Native SDK...  And choose any of them or even the latest one.. Although the latest one may give you some problems when releasing your app, depending on which OS version the BB has..

Developer
Posts: 107
Registered: ‎06-12-2012
My Device: Dev Alpha C, Playbook
My Carrier: Loop

Re: Update Contact failed

I have updated the Native SDk like this. But still can see that error. Does it have to do anything with the simulator. Do we have an option to update the simulator too.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.