Forum Discussion
christopher_gillis
7 years agoCommunity Manager
Hi Angela,
You can try passing in the
Christopher Gillis Aras Labs Software Engineer
inArgs and/or the inDom into your GetItemFromWindow method. It looks like inArgs.control only exists if the item is called from a CUI button.
// Call GetItemFromWindow
var methodArgs = {
contextWindow: window,
contextArgs: inArgs,
contextDom: inDom
}
var itm = aras.evalMethod("GetItemFromWindow", this.node, methodArgs);
Then you can add a check to the start of your GetItemFromWindow method like...
var win = inArgs.contextWindow;
var contextArgs = inArgs.contextArgs;
// The inArgs of the calling method only contain a control if it's from a CUI button
if (contextArgs && contextArgs.control) {
// Perform the lookup appropriate of an item from a CUI button
}
Chris
Christopher Gillis Aras Labs Software Engineer