Forum Discussion
8 Replies
- hadrien_guiducciIdeator I
New way to answer to this
Here an example with Apply Item + countOnly
<AML>
<Item type="Part" action="get" select="id,_status,_authoring_tool" returnMode="countOnly">
<generation condition="ge">1</generation>
<_status>
<Item type="_status" select="id" action="get">
<_name>Opened</_name>
</Item>
</_status>
</Item>
</AML>Aras répond
<SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../">
<SOAP-ENV:Body>
<Result />
<Message>
<event name="pagemax" value="1" />
<event name="itemmax" value="48" />
<event name="items_with_no_access_count" value="0" />
</Message>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>It works better in particular if it returns 0 => 30% faster
Best regards,
Hadrien
- JayrajvhIdeator I
This is cool. They have introduced new attribute returnMode
- JayrajvhIdeator I
Hello Hadrien,
You can do AmlResponse.getItemCount(), to get count of items in AML response that you receive. Alternatively of you just want to get count it would be safe to use SQL. SQL is not recommended for Create,Update and Delete operations but for Read its safe.
- hadrien_guiducciIdeator I
Hi Jayrajvh,
Your answer need to write a method to use AmlResponse.getItemCount() and it implies to get a response with all objects with at list the ID...
I want launch a SOAP request from outside Aras and just get an max item number as reply.
For SQL, yes it's works fine... But for security reason, no access rights to data we prefere not to use it.
==> I found a way to do this ! Not really nice but anyway it works.
You can use pagination with pagesize='1' and in the answer you get pagemax but also a itemmax !
And in the reply you find :
Best regards,
Hadrien
- JayrajvhIdeator I
This is innovative. I liked this approach.