Methods and the IOM

The IOM (Innovator Object Model or Item Object Model) is an Object Model on top of the AML. It provides the ability to build and submit AML documents to the Aras Innovator Server using a simple Object API.

There is the ‘Method’ ItemType, which is used to implement user defined business logic. Methods are written in JavaScript, C#, or VB.Net and use the IOM API to implement the business logic.

The following is a Method in JavaScript using the IOM that is the same as the AML BOM example in the previous section:

var innovator = new Innovator();
var partItem = innovator.newItem(“Part”,"add”);
partItem.setProperty(“item_number”, “999-888");
partItem.setProperty(“description”, “Some Assy”);
var bomItem = innovator.newItem(“Part BOM”,"add”);
bomItem.setProperty(“quantity”, “10");
var relatedItem = new Item(“Part”,"add”);
relatedItem.setProperty(“item_number”, “123-456");
relatedItem.setProperty(“description”, “1/4w 10% 10K Resistor”);
bomItem.setRelatedItem(relatedItem);
partItem.addRelationship(bomItem) ;
var resultItem = partItem.apply();