Getting the timezone of a user, via Web Services

sugarcrmdevelopers —  August 29, 2013 — Leave a comment

I came across this post on Stack Overflow today…

Using SugarCRM’s REST API, I can’t seem to find where to get a user’s timezone info.

This isn’t possible in the current Web Services API, as there’s no way to get at the User preferences via the API. However, this is possible with the new REST API coming this fall with Sugar 7, as you can not only use the /me/preference/:preference_name endpoint to get at preferences for the current user, but also combine it with the sudo call to switch to another user if you are an admin. Check out the following code example to see how…

You could of course use this to get at any user preference, or get all of them by hitting the /me/preferences endpoint instead.

No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s