Bobo,<br><br>I&#39;ve tested it here with accounts and potentials and both worked fine setting a group as the record&#39;s owner (used the admin user to do it). But now I think I know what&#39;s wrong with your call. Try to add an &quot;id&quot; attribute to your json with the same value as the &quot;potential_id&quot;, that&#39;s the only thing missing.<br>
<br>I&#39;m using the 5.2.1 too.<br><br>Cheers<br><br>Nicolas<br><br><div class="gmail_quote">2012/1/16 Bobo Wieland <span dir="ltr">&lt;<a href="mailto:bobo@prisjakt.nu">bobo@prisjakt.nu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <font color="#888888">I havn&#39;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.<br>
      <br>
      I still get the same error message. Does anyone else have this
      problem? Anyone that can verify it?<br>
      <br>
      btw, using </font><span style="color:#999999">vtiger
      5.2.1...</span><br>
    <font color="#888888"><br>
      <br>
    </font>Nicolas Larcipretti skrev 2012-01-13 13:15:
    <blockquote type="cite"><div><div class="h5">When you create you session, do you use an admin user?
      Cause, AFAIK, they&#39;re the only ones that can perform changes on
      any record. If you&#39;re using any other user that doesn&#39;t have admin
      privileges, this will trigger the &quot;access denied&quot; error.
      <div>
        <br>
      </div>
      <div>Cheers</div>
      <div><br>
      </div>
      </div></div><div>Nicolas<br>
        <br>
        <div class="gmail_quote">2012/1/13 Bobo Wieland <span dir="ltr">&lt;<a href="mailto:bobo@prisjakt.nu" target="_blank">bobo@prisjakt.nu</a>&gt;</span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5"> I&#39;m 100% sure that
              the session is correct. I havn&#39;t posted the whole chain of
              events here, but this is what I&#39;ve done:<br>
              <br>
              1. Verified my credentials and got a correct session.<br>
              2. Fetched a potential that I know to be assigned to a
              group (20x1756).<br>
              3a. Tried to change something in the potential and the
              update it without changing assigned_to. This causes the
              error.<br>
              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).<br>
              <br>
              This is all through the REST api using curl.<br>
              <br>
              Nicolas Larcipretti skrev 2012-01-13 12:58:
              </div></div><div>
                <div>
                  <blockquote type="cite"><div><div class="h5">Well, I&#39;ve never used curl to
                    do this before, but I think it can be used without
                    problems.
                    <div><br>
                    </div>
                    <div>Your request seems fine to me, the only things
                      you need to check are:</div>
                    <div>- the &quot;sessionName&quot;, cause if you create the
                      token in the wrong way, it won&#39;t let you finish
                      the request.</div>
                    <div>- the related id&#39;s that you&#39;re sending.</div>
                    <div><br>
                    </div>
                    <div>Are you shure that your group id is 1756? I
                      don&#39;t know how many users you have, but usualy
                      that a pretty high number to a group.</div>
                    <div> <br>
                    </div>
                    <div>Can you show us how are you creating your
                      session?</div>
                    <div><br>
                    </div>
                    <div>Cheers.</div>
                    <div><br>
                    </div>
                    </div></div><div>Nicolas<br>
                      <br>
                      <div class="gmail_quote">2012/1/13 Bobo Wieland <span dir="ltr">&lt;<a href="mailto:bobo@prisjakt.nu" target="_blank">bobo@prisjakt.nu</a>&gt;</span><br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5"> Sure.<br>
                            <br>
                            Data array:<br>
                            <pre>[amount] =&gt; 0.00
    [referenceid] =&gt; 
    [special_price] =&gt; 0
    [email] =&gt; 
    [countrybusiness] =&gt; SE
    [price_type] =&gt; Pricegroup A
    [expected_close_date] =&gt; 2012-01-09
    [created_time] =&gt; 2012-01-09 10:53:48
    [description] =&gt; 120109/SalesBot - Självprofilering
2012-01-09/SalesBot new status.

    [modified_time] =&gt; 2012-01-13 10:25:50
    [next_step] =&gt; 
    [potential_name] =&gt; Featured Store - demo
    [type] =&gt; Featured Store
    [potential_no] =&gt; POT3232
    [probability_(%)] =&gt; 0.00
    [related_to] =&gt; 3x793
    [sales_stage] =&gt; Closed Won
    [assigned_to] =&gt; 20x1756
    [potentialid] =&gt; 5x53741</pre>
                            <br>
                            <br>
                            This is the raw curl command:<br>
                            <br>
                            /usr/bin/curl --header &#39;Expect:&#39; --header
                            &#39;Authorization: Basic &lt;CODE&gt;&#39;
                            --include --url
                            &#39;&lt;VTIGER_URL&gt;/webservice.php&#39; --data
&#39;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&amp;operation=update&amp;sessionName=672515d54f100e7a0cc2e&#39;<br>

                            <br>
                            <br>
                            Nicolas Larcipretti skrev 2012-01-13 11:36:
                            </div></div><blockquote type="cite">
                              <div>
                                <div><div><div class="h5">Can you paste here your entire REST
                                  call? I might help you cause I have a
                                  method that does group creation via
                                  webservice here.
                                  <div><br>
                                  </div>
                                  <div>Cheers</div>
                                  <div><br>
                                  </div>
                                  </div></div><div>Nicolas<br>
                                    <br>
                                    <div class="gmail_quote">2012/1/13
                                      Bobo Wieland <span dir="ltr">&lt;<a href="mailto:bobo@prisjakt.nu" target="_blank">bobo@prisjakt.nu</a>&gt;</span><br>
                                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                        <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5"> Coming back to
                                          this issue. Just ignored it
                                          for a while.<br>
                                          <br>
                                          Trying to set assigned_to for
                                          a potential to &quot;20x1756&quot;
                                          (which is a valid group that
                                          many potentials is assigned to
                                          in our vtiger system) still
                                          gives me the error message:<br>
                                          <br>
                                          &quot;Cannot assign record to the
                                          given user (ACCESS_DENIED)&quot;<br>
                                          <br>
                                          I do this using the REST Web
                                          Services using &quot;update&quot;
                                          <div><br>
                                            <br>
                                            <br>
                                            <br>
                                            praneeth K skrev 2011-10-28
                                            12:51: </div>
                                          </div></div><blockquote type="cite">Hi ,
                                            <div>
                                              <div><div><div class="h5"><br>
                                                <br>
                                                  Generally group id
                                                will be in the format of
                                                &#39;20x<i>groupId</i>&#39;. I
                                                hope you are passing id
                                                to the REST api in the
                                                same format. <br>
                                                <br>
                                                </div></div><div class="gmail_quote"><div><div class="h5">On
                                                  Fri, Oct 28, 2011 at
                                                  1:51 PM, Bobo Wieland
                                                  <span dir="ltr">&lt;<a href="mailto:bobo@prisjakt.nu" target="_blank">bobo@prisjakt.nu</a>&gt;</span>
                                                  wrote:<br>
                                                  </div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5">Using

                                                    the REST-api, is it
                                                    possible to set
                                                    &quot;assigned_to&quot; for a
                                                    Potential<br>
                                                    to a Group? I get an
                                                    ACCESS_DENIED when I
                                                    try even though it
                                                    works<br>
                                                    perfectly to set it
                                                    to a group using the
                                                    standard
                                                    webinterface.<br>
                                                    <br>
                                                    best regards<br>
                                                    <font color="#888888">Bobo
                                                      Wieland - <a href="mailto:bobo@prisjakt.nu" target="_blank">bobo@prisjakt.nu</a><br>
_______________________________________________<br>
                                                    </font></div></div><a href="http://iger.com/" target="_blank">iger.com/</a></blockquote>
                                                </div>
                                              </div>
                                            </div>
                                          </blockquote>
                                        </div>
                                      </blockquote>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                        </blockquote>
                      </div>
                    </div>
                  </blockquote>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote><div class="im">
    <br>
    <br>
    <div>-- <br>
      <i>Med vänliga hälsningar<br>
        Bobo - <a href="mailto:bobo@prisjakt.nu" target="_blank">bobo@prisjakt.nu</a></i></div>
  </div></div>

<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br>