CycleOp - Friday, September 17, 2010 7:14 AM:
Hi all,
I have 2 ItemTypes (Order & Part) and a Relationship between them (Order is Source)
The parts are pre-populated in the system, and a new order arrives in the form of an AML.
Is it possible to build an AML which (in one shot) adds an order to Innovator and links it to the existing parts (identified by their 'item_number') ?
I have constructed the following AML but I am getting an error and not sure what's wrong, or if this even possible.
Here's what I've got so far:
<AML>
<Item type="Order" action="add">
<name>My Order</name>
<Relationships>
<Item type="Order Part Rel" action="add">
<quantity>10</quantity>
<related_id>
<Item type="Part" action="edit">
<item_number>PRT-01040</item_number>
</Item>
</related_id>
</Item>
</Relationships>
</Item>
</AML>
CycleOp - Friday, September 17, 2010 11:08 AM:
OK - Managed to find it out for myself. Here goes:
<AML>
<Item type="Part" action="add">
<name>My Order</name>
<Relationships>
<Item type="Part BOM" action="add">
<quantity>10</quantity>
<related_id>
<Item type="Part" action="get">
<item_number condition="eq">PRT-01040</item_number>
</Item>
</related_id>
</Item>
</Relationships>
</Item>
</AML>