-
Notifications
You must be signed in to change notification settings - Fork 17
Javascript How To
Eric Domke edited this page Jul 12, 2019
·
6 revisions
top.aras.uiShowItem(itemTypeName : String, itemID : String, viewMode? : String, isUnfocused? : Boolean);-
itemTypeName: may be empty string if item is in client cache -
itemID: ID of the item obligatory -
viewMode: 'tab view' or 'openFile', if not specifiedaras.getVariable('viewMode')is used -
isUnfocused:trueorfalse, if not specifiedaras.getVariable('TearOff')is used
top.aras.runReport(report : Element, itemTypeID : String, item : Element);-
report: Report element -
itemTypeID: ID of the itemtype. Can be an empty string and inferred from theitemparameter -
item: AML definition of the item
var report = top.aras.getItemByKeyedName("Report", "{Report Name}");
var item; // XML Node representing item. Could be result of
// top.aras.getItemById('{ItemType}', '{Item ID}')
top.aras.runReport(report, "", item);top.aras.evalMethod(methodName : String, itemNode : Element, addArgs? : Object);-
methodName: the name of the Method item -
itemNode: the item dom -
addArgs: Object with any additional parameters.
top.aras.copyItem(itemTypeName : String, itemID : String);top.aras.lockItem(itemID : String, itemTypeName : String);top.ArasCore.Dialogs.properties(item : Element, itemType : Element, options? : Object)-
item: Item node -
itemType: ItemType node -
options: options object. For example,{aras: this.aras}
OR
top.aras.getMainWindow().ArasCore.Dialogs.properties(...)This should be executed from Javascript on a form
window.parent.onRevisionsCommand()v12+
parent.document.querySelector('.aras-item-view__relationship-accordion').collapse()< v12
parent.windowStateObject.setCollapse();
parent.windowStateObject.updateButtons();top.aras.registerEventHandler(event : String, window : Any, callback : Any);Events:
- VariableChanged
- PreferenceValueChanged
- ItemLock
- ItemSave
v12+
aras.getMainWindow().arasTabs.openForm(formId, icon, label)
aras.getMainWindow().arasTabs.openPage(url, itemTypeId, icon, label)
aras.getMainWindow().arasTabs.openSearch(itemTypeId, [savedSearchID])< v12
top.tree.onGridClick("InBasket Task")
top.tree.mainTreeApplet.select("InBasket Task")