bobo at prisjakt.nu
Mon Jan 16 05:32:19 PST 2012
I havn't had any problems with create/update using a non-admin user in
any other respect. But I tried to change my user to be admin, and also
to put the user in the group that Iäm trying to assign the potential to.
I still get the same error message. Does anyone else have this problem?
Anyone that can verify it?
btw, using vtiger 5.2.1...
Nicolas Larcipretti skrev 2012-01-13 13:15:
> When you create you session, do you use an admin user? Cause, AFAIK,
> they're the only ones that can perform changes on any record. If
> you're using any other user that doesn't have admin privileges, this
> will trigger the "access denied" error.
> 2012/1/13 Bobo Wieland <bobo at prisjakt.nu <mailto:bobo at prisjakt.nu>>
> I'm 100% sure that the session is correct. I havn't posted the
> whole chain of events here, but this is what I've done:
> 1. Verified my credentials and got a correct session.
> 2. Fetched a potential that I know to be assigned to a group
> 3a. Tried to change something in the potential and the update it
> without changing assigned_to. This causes the error.
> 3b. Create a new potential/edit another potential and set
> assigned_to to 20x1756. This causes the error (assigning the
> potential to a user (19xXXXX) works).
> This is all through the REST api using curl.
> Nicolas Larcipretti skrev 2012-01-13 12:58:
>> Well, I've never used curl to do this before, but I think it can
>> be used without problems.
>> Your request seems fine to me, the only things you need to check are:
>> - the "sessionName", cause if you create the token in the wrong
>> way, it won't let you finish the request.
>> - the related id's that you're sending.
>> Are you shure that your group id is 1756? I don't know how many
>> users you have, but usualy that a pretty high number to a group.
>> Can you show us how are you creating your session?
>> 2012/1/13 Bobo Wieland <bobo at prisjakt.nu <mailto:bobo at prisjakt.nu>>
>> Data array:
>> [amount] => 0.00
>> [referenceid] =>
>> [special_price] => 0
>> [email] =>
>> [countrybusiness] => SE
>> [price_type] => Pricegroup A
>> [expected_close_date] => 2012-01-09
>> [created_time] => 2012-01-09 10:53:48
>> [description] => 120109/SalesBot - Självprofilering
>> 2012-01-09/SalesBot new status.
>> [modified_time] => 2012-01-13 10:25:50
>> [next_step] =>
>> [potential_name] => Featured Store - demo
>> [type] => Featured Store
>> [potential_no] => POT3232
>> [probability_(%)] => 0.00
>> [related_to] => 3x793
>> [sales_stage] => Closed Won
>> [assigned_to] => 20x1756
>> [potentialid] => 5x53741
>> This is the raw curl command:
>> /usr/bin/curl --header 'Expect:' --header 'Authorization:
>> Basic <CODE>' --include --url '<VTIGER_URL>/webservice.php'
>> Nicolas Larcipretti skrev 2012-01-13 11:36:
>>> Can you paste here your entire REST call? I might help you
>>> cause I have a method that does group creation via
>>> webservice here.
>>> 2012/1/13 Bobo Wieland <bobo at prisjakt.nu
>>> <mailto:bobo at prisjakt.nu>>
>>> Coming back to this issue. Just ignored it for a while.
>>> Trying to set assigned_to for a potential to "20x1756"
>>> (which is a valid group that many potentials is assigned
>>> to in our vtiger system) still gives me the error message:
>>> "Cannot assign record to the given user (ACCESS_DENIED)"
>>> I do this using the REST Web Services using "update"
>>> praneeth K skrev 2011-10-28 12:51:
>>>> Hi ,
>>>> Generally group id will be in the format of
>>>> '20x/groupId/'. I hope you are passing id to the REST
>>>> api in the same format.
>>>> On Fri, Oct 28, 2011 at 1:51 PM, Bobo Wieland
>>>> <bobo at prisjakt.nu <mailto:bobo at prisjakt.nu>> wrote:
>>>> Using the REST-api, is it possible to set
>>>> "assigned_to" for a Potential
>>>> to a Group? I get an ACCESS_DENIED when I try even
>>>> though it works
>>>> perfectly to set it to a group using the standard
>>>> best regards
>>>> Bobo Wieland - bobo at prisjakt.nu
>>>> <mailto:bobo at prisjakt.nu>
/Med vänliga hälsningar
Bobo - bobo at prisjakt.nu/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtigercrm-developers