Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of a custom action in Aras Innovator
Innovator inn = this.getInnovator();
Item partToAdd = this;
string parentPartNumber = this.getAttribute("parent", "");
if (String.IsNullOrEmpty(parentPartNumber))
// If no parent is specified, just add the part like normal
return partToAdd.apply();
// If there is a parent, also create a relationship to that parent as part of this add
Item relationshipToParent = inn.newItem("Part BOM", "add");
Item parentPart = relationshipToParent.createPropertyItem("source_id", "Part", "get");
parentPart.setProperty("item_number", parentPartNumber);
return relationshipToParent.apply();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment