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
if (inArgs.isReinit) { | |
var topWindow = aras.getMostTopWindowWithAras(window); | |
var workerFrame = topWindow.work; | |
if (workerFrame && workerFrame.grid && workerFrame.grid.getSelectedItemIds().length > 1) | |
{ | |
return { "cui_disabled": false }; // enable the button | |
} | |
else | |
{ | |
return { "cui_disabled": true }; // disable the button |
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
// Get the field we want to populate dynamically | |
var item = getFieldComponentByName('owned_by_id'); | |
// Override the default server call | |
item.component.request = function() { | |
var itemType = this.state.itemType; | |
var maxCount = this.state.maxItemsCount; | |
var label = this.state.label; | |
var req = |
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
// Get the field we want to populate dynamically | |
var dropdown = getFieldComponentByName('authoring_tool'); | |
/* Construct a filtered list that contains only Microsoft Office authoring tools */ | |
var listItm = aras.IomInnovator.newItem("List", "get"); | |
listItm.setAttribute("select", "id"); | |
listItm.setProperty("name", "Authoring Tools"); | |
var itms = aras.IomInnovator.newItem("Value", "get"); | |
itms.setAttribute("select", "value,label"); |
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
' Primary code that will execute when this method is called | |
Dim test as New Foo | |
Return Me.getInnovator().newResult(test.Food()) | |
End Function | |
' Our class definition | |
Public Class Foo | |
Function Food() as String | |
Return "Cheese" | |
End Function |
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(); | |
if (this.getProperty("is_sibling") == "1") { | |
return this; | |
} else { | |
Item newDoc = inn.newItem("Document", "add"); | |
newDoc.setProperty("item_number", this.getProperty("item_number") + " - Design"); | |
newDoc.setProperty("name", this.getProperty("name") + "'s Sibling"); | |
newDoc.setProperty("is_sibling", "1"); | |
newDoc = newDoc.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
// WARNING: This code will cause an infinite loop when run from an onBeforeAdd event on the Document ItemType. | |
// It is meant to serve as an example only. | |
Innovator inn = this.getInnovator(); | |
Item newDoc = inn.newItem("Document", "add"); | |
newDoc.setProperty("item_number", this.getProperty("item_number") + " - Design"); | |
newDoc.setProperty("name", this.getProperty("name") + "'s Sibling"); | |
newDoc = newDoc.apply(); | |
return this; |
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
<AML> | |
<Item type="Part" action="add"> | |
<item_number>PRT-0002</item_number> | |
<name>My New Part</name> | |
<fake_property>Test</fake_property> | |
</Item> | |
</AML> |
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
<AML> | |
<Item type="Part" action="add"> | |
<item_number>PRT-0001</item_number> | |
<name>My New Part</name> | |
</Item> | |
</AML> |
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
var input = getFieldByName("owned_by_id"); | |
setTimeout(function() { | |
input.getElementsByTagName("input")[0].disabled = true; | |
input.getElementsByTagName("button")[0].disabled = true; | |
}, 100); |