[Vtigercrm-developers] REST
Bobo Wieland
bobo at prisjakt.nu
Fri Jan 13 04:07:16 PST 2012
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 (20x1756).
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?
>
> Cheers.
>
> Nicolas
>
> 2012/1/13 Bobo Wieland <bobo at prisjakt.nu <mailto:bobo at prisjakt.nu>>
>
> Sure.
>
> 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' --data
> 'element=%7B%22amount%22%3A%220.00%22%2C%22cf_507%22%3A%22%22%2C%22cf_629%22%3A%220%22%2C%22cf_630%22%3A%22%22%2C%22cf_703%22%3A%22SE%22%2C%22cf_705%22%3A%22Pricegroup+A%22%2C%22closingdate%22%3A%222012-01-09%22%2C%22createdtime%22%3A%222012-01-09+10%3A53%3A48%22%2C%22description%22%3A%22120109%5C%2FSalesBot+-+Sj%5Cu00e4lvprofilering%5Cn2012-01-09%5C%2FSalesBot+new+status.%5Cn%22%2C%22modifiedtime%22%3A%222012-01-13+10%3A25%3A50%22%2C%22nextstep%22%3A%22%22%2C%22potentialname%22%3A%22Featured+Store+-+demo%22%2C%22opportunity_type%22%3A%22Featured+Store%22%2C%22potential_no%22%3A%22POT3232%22%2C%22probability%22%3A%220.00%22%2C%22related_to%22%3A%223x793%22%2C%22sales_stage%22%3A%22Closed+Won%22%2C%22assigned_user_id%22%3A%2220x1756%22%2C%22id%22%3A%225x53741%22%7D&operation=update&sessionName=672515d54f100e7a0cc2e'
>
>
> 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.
>>
>> Cheers
>>
>> Nicolas
>>
>> 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
>>> webinterface.
>>>
>>> best regards
>>> Bobo Wieland - bobo at prisjakt.nu <mailto:bobo at prisjakt.nu>
>>> _______________________________________________
>>> http://www.vtiger.com/
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Best Regards,
>>> K Praneeth,
>>> vtiger Team.
>>>
>>> *Connect with us on: *Twitter
>>> <http://twitter.com/#%21/vtigercrm> *I* Facebook
>>> <http://www.facebook.com/pages/vtiger/226866697333578?sk=wall>
>>> *I* Blog <http://blog.vtiger.com/>* I* Wiki
>>> <http://wiki.vtiger.com/index.php/Main_Page> *I *Forums
>>> <http://forums.vtiger.com/>*I* Website <http://vtiger.com/>
>>>
>>
>>
>> --
>> /Med vänliga hälsningar
>> Bobo - bobo at prisjakt.nu <mailto:bobo at prisjakt.nu>/
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>
>
> --
> /Med vänliga hälsningar
> Bobo - bobo at prisjakt.nu <mailto:bobo at prisjakt.nu>/
>
> _______________________________________________
> http://www.vtiger.com/
>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
--
/Med vänliga hälsningar
Bobo - bobo at prisjakt.nu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20120113/60d1d5fb/attachment-0002.html
More information about the vtigercrm-developers
mailing list