Skip to content

Instantly share code, notes, and snippets.

View AngelaIp's full-sized avatar
👑
There are many PLM experts, but there is only one Queen!

AngelaIp

👑
There are many PLM experts, but there is only one Queen!
View GitHub Profile
@AngelaIp
AngelaIp / DisableDateField.js
Created May 4, 2023 16:44 — forked from cgillis-aras/DisableDateField.js
Sample code demonstrating how to disable a date field in Aras Innovator
var input = getFieldByName("effective_date");
input.getElementsByTagName("input")[0].disabled = true;
input.getElementsByTagName("input")[1].disabled = true;
input.getElementsByTagName("input")[1].src = "../images/calendar-disabled.svg";
@AngelaIp
AngelaIp / AttributeShorthandFunctions.cs
Created May 4, 2023 16:43 — forked from cgillis-aras/AttributeShorthandFunctions.cs
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");
@AngelaIp
AngelaIp / OpenItemInEditMode.js
Created September 10, 2019 16:28 — forked from cgillis-aras/OpenItemInEditMode.js
Sample JavaScript code to open an item in edit mode in Aras Innovator 12.0
/*
* We need to wait for the item's form to fully load before we switch the window to edit mode.
* Luckily, aras.uiShowItem returns a Promise that happens to resolve once the window loads. This
* means we can pass in a function using Promise.then(ourFunction) that will be called after the
* Promise resolves and the item window is loaded.
*/
aras.uiShowItem("Part", "64B2100E21B44980B42FB445951310BF").then(function()
{
// Look up the tab that was just loaded
var myItemWin = aras.uiFindWindowEx("64B2100E21B44980B42FB445951310BF");