This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Different result from code vs nash.

mozes - Tuesday, December 25, 2012 3:55 AM:

Hi all I have one AML query with two different results.
I am interested in the related_id Item.
 
      string itemType = item.getType();
      string itemId = item.getID();
      string amlStr = string.Format(
"<AML><Item type='{0}' action='get'><id>{1}</id></Item></AML>", itemType,itemId);
      Item resultItem = inn.applyAML(amlStr);
 
result from method:

itemFull ==
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <Result>
      <Item type="cof_Assignment" typeId="..." id="...">
        <related_id is_null="0" />
      </Item>
    </Result>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
when I use the same qury in Nash or AML-STudio I get the right required result:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <Result>
      <Item type="cof_Assignment" typeId="..." id="...">
        <related_id keyed_name="111" type="cof_affected Item">
          <Item type="Document" typeId="B88C14B99EF449828C5D926E39EE8B89" id="1190CB9BF0F547239BE4C4231A44FCE3">
            <classification>Beheerd</classification>
          </Item>
        </related_id>
      </Item>
    </Result>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
I also tried the attributes levels='4' and related_expand='1', I even tried to use item.apply() all with the same result.
The query used in the code always gave the same result for related_id.
<related_id is_null="0" />
 
I wounder if someone has an Idea how to solve this I need the related_id in the method I wrote.
 
Regards,
Mozes

 

 



mozes - Wednesday, January 2, 2013 4:26 AM:

Hi All,

I wish you all  happy new year.
The problem seemed to be the permission for Aras PLM on that affected Item.

I solved this by adding Aras PLM to a group with the right permissions.
(tnaks to Sean Coleman)