[Vtigercrm-developers] How to use server api to get information about assigned user, like their name?
Alan Lord
alanslists at gmail.com
Fri Apr 3 14:18:11 GMT 2020
I'm working on another idea for a module and to work within the rules of
the Marketplace I am trying to use the server API vtws_retrieve to get
information about the assigned_user_id of a record to display in a
different environment. I am using vtws_retrieve to get the data from the
original record, but I can't do the same to get "display" data regarding
the assigned user...
If I try something like:
> vtws_retrieve('19x22', $current_user)
And I am that current user, e.g. id 22, then the call fails with
"Permission to perform the operation is denied"
All I actually want is to get some of the basic data like the display
name (first_name + ' ' + last_name) and maybe their email/phone etc...
But this seems to be not possible.
What is the correct way to do this? I could, or course use a different
user to make these calls i.e. Users::getActiveAdminUser(), but I am not
sure if that would be permitted by the marketplace rules.
PS: Also in many ways, it's a lot easier using things like the record
models as they have built in methods like getDisplayName()...
More information about the vtigercrm-developers
mailing list