Skip to content

Instantly share code, notes, and snippets.

@cgillis-aras
Created December 16, 2020 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgillis-aras/7a241272b9370923c9f9874e0ff69b9d to your computer and use it in GitHub Desktop.
Save cgillis-aras/7a241272b9370923c9f9874e0ff69b9d to your computer and use it in GitHub Desktop.
An example of a method inside of Aras Innovator that adds an item while using the doGetItem attribute
Innovator inn = this.getInnovator();
Item newPart = inn.newItem("Part", "add");
newPart.setProperty("item_number", "New Part 1");
newPart.setAttribute("doGetItem", "0");
newPart = newPart.apply();
// You can still validate the response when using doGetItem
if (newPart.isError())
{
// The item failed to be created, so handle that appropriately
}
// Otherwise continue as normal
return newPart;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment