Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AngelaIp/6d5b63539f330f4448975b1b2b6679aa to your computer and use it in GitHub Desktop.
Save AngelaIp/6d5b63539f330f4448975b1b2b6679aa to your computer and use it in GitHub Desktop.
Examples of the specific attribute shorthand functions in Aras Innovator.
Innovator inn = this.getInnovator();
Item part = inn.newItem();
/* All of the pairs of functions below are equivalent */
// Set the type attribute
part.setAttribute("type", "Part");
part.setType("Part");
// Set the action attribute
part.setAttribute("action", "get");
part.setAction("get");
// Set the ID attribute
part.setAttribute("id", "00995D4043BC48CE9D869D78C17CF0D6");
part.setID("00995D4043BC48CE9D869D78C17CF0D6");
/* Similarly, there are corresponding getType, getAction, and getID functions */
string type, action, id;
// Get the type attribute
type = part.getAttribute("type");
type = part.getType();
// Get the action attribute
action = part.getAttribute("action");
action = part.getAction();
// Get the ID attribute
id = part.getAttribute("id");
id = part.getID();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment