使用SugarCRM的REST API,我似乎找不到在哪里获取用户的时区信息。
尝试过,但只列出了:get_entry
('Users', 'id')
[u'employee_status', u'last_name', u'picture', u'created_by_name', u'show_on_employee
s', u'team_id', u'accept_status_name', u'phone_fax', u'full_name', u'address_state',
u'team_name', u'messenger_id', u'address_country', 'id', u'email1', u'first_name', u'
date_entered', u'title', u'address_street', u'receive_notifications', u'reports_to_id
', u'phone_work', u'created_by', u'name', u'reports_to_name', u'UserType', u'external
_auth_only', u'authenticate_id', u'modified_by_name', u'department', u'sugar_login',
u'user_name', u'email', u'user_hash', u'status', u'm_accept_status_fields', u'pwd_las
t_changed', u'description', u'deleted', u'is_group', u'phone_other', u'is_admin', u'c
_accept_status_fields', u'messenger_type', u'accept_status_id', u'address_city', u'mo
dified_user_id', u'team_set_id', u'preferred_language', u'date_modified', u'phone_hom
e', u'address_postalcode', u'phone_mobile', u'system_generated_password', u'email_lin
k_type', u'default_team', u'portal_only']
不幸的是,它不能通过REST API使用。要获取它,您需要创建一个自定义的REST API方法来为您获取该数据。为此,这里有很多不错的文章:http : //support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_6.7/02_Application_Framework/Web_Services/06_Extending_Web_Services
一旦有了自定义方法,就可以很容易地将数据返回给调用方,您只需执行以下操作即可检索用户的时区:
<?php
// $user being a User Object
$timezone = TimeDate::userTimezone($user);
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句