Forum Discussion

badgie's avatar
badgie
Ideator I
4 years ago

How does Aras handle the action(s) on a collection of items in an AML?

I have written a server method that uses some custom XML-like AML to implement an inventory reconciliation.  I would like to pass in a collection of items for this method to act on.

When I implement a server call like:

<AML>
    <Item type="Part" id="1" action="mymethod"/>
    <Item type="Part" id="2" ./>
</AML>

is "this" the collection?  Or is the correct approach to pass the collection within an item?

<AML>
    <Item type="Part" id="x" action="mymethod">
        <Item type="Part" id="1" ./>
        <Item type="Part" id="2" ./>
    </Item>
</AML>

Or, is it generally considered best practice to have the server method called independently for each item?   

Thank you!

1 Reply

  • I just received help on a similar thing, downloading all CAD files that are part of a structure.  Once I got my methods working (thanks for the help Gopikrishnan), I pasted what I used into the post incase someone else had a similar question.  You may be able to modify it to work how you need.  It is a JavaScript method that calls a C# method, all started by an Activity.  I hope this helps.

    Automate download of CAD files to send to Supplier