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
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"; |
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(); | |
/* 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"); |
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
const notify = aras.getNotifyByContext(window); | |
notify("Blue notification message is displayed"); |
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
/* | |
* 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"); |
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
MIT License | |
Copyright (c) 2019 AngelaIp | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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(); | |
string id = this.getProperty("id"); | |
// Check if Goal relationships are available; | |
Item goals = this.newItem("Part Goal","get"); | |
goals.setProperty("source_id",id); | |
goals.setAttribute("select", "id"); | |
goals = goals.apply(); |
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(); | |
this.setProperty("myproperty_","valueofsomething"); | |
Item res = this.apply("MyTestMethod"); | |
if (res.isError()) | |
{ | |
XmlDocument xDoc = new XmlDocument(); | |
xDoc.LoadXml(res.ToString()); | |
string faultstring = xDoc.SelectSingleNode("//faultstring").InnerText; | |
return inn.newError("Error while doing something: " + faultstring); | |
} |
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
// Download file to local host | |
var check = aras.downloadFile(fileItem, newFileName); | |
if (check === true) | |
{ | |
aras.AlertSuccess("Download successful"); | |
} | |
else | |
{ | |
aras.AlertSuccess("Download failed"); | |
} |
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
/* Example body used in Action with Type 'ItemType' | |
<body> | |
<formId>1234570871854123453362C7B712345</formId> | |
<formTitle>My Example Form</formTitle> | |
</body>*/ | |
var parser = new DOMParser(); | |
var xmlDoc = parser.parseFromString(this,"text/xml"); | |
var formId = xmlDoc.getElementsByTagName("formId")[0].childNodes[0].nodeValue; | |
var formTitle = xmlDoc.getElementsByTagName("formTitle")[0].childNodes[0].nodeValue; |