Forum Discussion
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.
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
- Jayrajvh6 years agoIdeator I
This is innovative. I liked this approach.
- hadrien_guiducci6 years agoIdeator I
;) this is because I am not a dev ;) Thanks for you help !
- Jayrajvh6 years agoIdeator I
Now as the details are very clear, I can suggest one more approach - use generic method as Action.
Write server side method in ARAS 'getItemCountFromItemType' in ARAS which can accept parameter as <ItemTypeName> and return only the total count of items.
Above code resides in ARAS.
Externally you can just send a SOAP request with below AML
<AML>
<Item type="user" action="getItemCountFromItemType">
<ItemTypeName>user</ItemTypeName>
</Item>
</AML>This will return only total count of users.
- hadrien_guiducci6 years agoIdeator I
Yes :) it can work also thanks. Since we have a lot of parameter with effectivity dates etc. We want to do the everything with an external soap action. But I keep in mind the getItemCount [emoticon:c4563cd7d5574777a71c318021cbbcc8]