Created
January 11, 2021 21:20
-
-
Save cgillis-aras/38a5e8413c504b2817e2ddf745e11267 to your computer and use it in GitHub Desktop.
Examples of shorthand functions for adding items to a query in Aras Innovator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Innovator inn = this.getInnovator(); | |
Item part = inn.newItem("Part", "get"); | |
// Add a Part BOM relationship to this query | |
Item partBom = inn.newItem("Part BOM", "get"); | |
part.addRelationship(partBom); | |
// Shorthand equivalent | |
Item partBom = part.createRelationship("Part BOM", "get"); | |
// Add an Item property to this query | |
Item createdBy = inn.newItem("User", "get"); | |
part.setPropertyItem("created_by_id", createdBy); | |
// Shorthand equivalent | |
Item createdBy = part.createPropertyItem("created_by_id", "User", "get"); | |
// Add a related item to this query | |
Item relatedPart = partBom.createPropertyItem("related_id", "Part", "get"); | |
// Shorthand equivalent | |
Item relatedPart = partBom.createRelatedItem("Part", "get"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment