Setting Account Name Prefix, Middle Name, and Suffix in Java

71 views
Skip to first unread message

Rhett

unread,
Dec 5, 2011, 1:01:03 PM12/5/11
to google-app...@googlegroups.com
I have been trying to determine the correct way to set the Name Prefix, Middle Name, and Name Suffix values for accounts so that these values appear in the contact entry.  I tried setting these values from the Name() object returned from the ContactEntry and ProfileEntry objects, neither of these approaches worked.  When I posted to the Contacts API forum, someone from Google told me that those values are part of the provisioned account and should be set with the provisioning API.  However, when I get the Name() object from the UserEntry object, it is a different class than Name returned from ContactEntry and ProfileEntry.

UserEntry.getName() returns an object of the class com.google.gdata.data.appsforyourdomain.Name, which does not support AdditionalName, NamePrefix, or NameSuffix.

ProfileEntry.getName() and ContactEntry.getName() return an object of the class com.google.gdata.data.extensions.Name, which does support AdditionalName, NamePrefix, and NameSuffix but these values do not register with the contact entry and are not set when the ProfileEntry or ContactEntry object is updated.  I have tried adding this class as an extension point to UserEntry but that does not work either.

My question is actually pretty simple.  How do I set the NamePrefix, AdditionaName, and NameSuffix for a user so that they appear in the contacts entry?

Shraddha Gupta

unread,
Dec 5, 2011, 1:37:43 PM12/5/11
to google-app...@googlegroups.com
Hello Rhett.

The Name entry in ContactEntry and ProfileEntry is immutable.
It cannot be updated using these APIs.
You have to use the Provisioning API for updating Name Entry.

thanks,
Shraddha Gupta
Developer Programs Engineer
Hyderabad, Google India.




--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/MzG2_7ED7g8J.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Rhett

unread,
Dec 7, 2011, 2:51:38 PM12/7/11
to google-app...@googlegroups.com
Yes, I understand that Shraddha.  As I wrote in my original post, the object returned from the UserEntry.getName() method is of the type com.google.gdata.data.appsforyourdomain.Name which does not have fields for Name Prefix, Middle Name, and Name Suffix.

My question still remains unanswered.  How do I set the NamePrefix, AdditionaName, and NameSuffix for a user so that they appear in the contacts entry?  If you can provide me with a simple pseudo code snippet or a reference to the correct "Name" class to use, that would be great.

Thanks. 

Shraddha Gupta

unread,
Dec 8, 2011, 4:21:05 PM12/8/11
to google-app...@googlegroups.com
Hello Rhett,

I am sorry for the delayed response.

There is no way to set the AdditionalName so that it appears in the ContactEntry.

The Provisioning API allows setting the Name

The Contacts API works on a user's contacts (your own contact list)
You can set the additional name for your contact, but you cannot set the additional name for a user so that appears in the ContactEntry

The Profiles API works on the domain's user profiles: lets you add more information to a domain user (phone number, address, etc...)
However, the Profiles API doesn't modify the name of the profile, because this is set by the Provisioning API (or Control Panel)

If you need this feature, you can make a feature request in the issue tracker:

thanks,
Shraddha Gupta
Developer Programs Engineer
Hyderabad, Google India.



--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.

Sunny Thakur

unread,
Dec 9, 2011, 1:02:07 AM12/9/11
to google-app...@googlegroups.com
Hi Shraddha,
                   Right now i am working on chrome extension i need a help ...I want to show alert from my background.html whenever the user click the compose button in gmail account .
--
Thanks and Regards,
Sunny

Claudio Cherubino

unread,
Dec 9, 2011, 9:53:48 AM12/9/11
to google-app...@googlegroups.com
Hi Sunny,

Please don't post the message multiple times and on unrelated threads.
Thanks

Claudio

Rhett

unread,
Dec 12, 2011, 12:42:59 PM12/12/11
to google-app...@googlegroups.com
Shraddha,

Just to be sure that I understand what you are telling me.  There is no way to set these values (see image) by using any of the API?


Rhett

unread,
Dec 12, 2011, 12:43:36 PM12/12/11
to google-app...@googlegroups.com
Obviously, my screen shot was removed from the post.

Shraddha Gupta

unread,
Dec 13, 2011, 2:06:52 AM12/13/11
to google-app...@googlegroups.com
Hi Rhett,

I got your mail but there was some problem with your screenshot. May be it did not get attached properly. 
Can your try sending me directly at my email id shra...@google.com.

Thank you,

Shraddha Gupta
Developer Programs Engineer
Hyderabad, Google India.



On Mon, Dec 12, 2011 at 11:13 PM, Rhett <rhet...@gmail.com> wrote:
Obviously, my screen shot was removed from the post.

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.

Rhett

unread,
Dec 13, 2011, 3:18:13 PM12/13/11
to google-app...@googlegroups.com
Somehow, your email address is incomplete in the post.  To me, it appears as "shra...@google.com" Can you just tell me the mail account name without the "@google.com"?

Thanks for your help.

Shraddha Gupta

unread,
Dec 13, 2011, 11:00:53 PM12/13/11
to google-app...@googlegroups.com
My id is shraddhag

Thanks,

Shraddha Gupta
Developer Programs Engineer
Hyderabad, Google India.



On Wed, Dec 14, 2011 at 1:48 AM, Rhett <rhet...@gmail.com> wrote:
Somehow, your email address is incomplete in the post.  To me, it appears as "shra...@google.com" Can you just tell me the mail account name without the "@google.com"?

Thanks for your help.

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
Reply all
Reply to author
Forward
0 new messages