Contacts Orgranization and Job title

21 views
Skip to first unread message

praveen

unread,
Nov 12, 2008, 2:33:26 AM11/12/08
to Google Contacts API
Hi,

I am getting error while trying to add/update orgranization or job
title individualy.

If I provide both, then it seems to be working fine but as long as one
of them is missing it gives me error.

Is this means both fields depends on each other (limitation)?

This error occurs both in windows mobile and desktop versions of
Contact API.


Thanks and Regards

Praveen Negi

Julian (Google)

unread,
Nov 13, 2008, 1:10:38 PM11/13/08
to Google Contacts API
Hi,

You should be able to update an organization or job title
individually. But the organization label can not be empty for adding.
What library (or programing language) are you using? Can you send the
error you are getting?

For example, in Java, this will update only the organization name:

URL entryUrl = new URL("http://www.google.com/m8/feeds/contacts/user
%40domain.com/full/2d1f64a0cc22924");
ContactEntry contactEntry = myService.getEntry(entryUrl,
ContactEntry.class );
Organization organization = contactEntry.getOrganizations().get(0);
organization.setOrgName(new OrgName("OrgNameTest"));
contactEntry.getOrganizations().set(0,organization);
contactEntry.update();

I was also able to add only a organization name, including the label:

Organization organization = new Organization();
organization.setOrgName(new OrgName("OrgNameTest2"));
organization.setLabel("other");
contactEntry.getOrganizations().add(organization);
contactEntry.update();

Cheers,
Julian
Reply all
Reply to author
Forward
0 new messages