Adding a CUI button, getting context item

Hi aras team,

I am adding a cui button to the command bar, but random question...

How can I get the context item for my method? The usual ways don't seem to apply and I am getting an error:

"identifier 'options' has already been declared"

the onClick event I setup has attempted to run against document.item, document.thisItem and I also tried parent :/

All the blogs seem to focus on get selected items in a grid, not the active window item.

Parents Reply
  • I have long come to terms with the fact that there is no good documentation and never will be. The only support for the community is the debugger and sources.

    I didn't know anything about "options" three days ago. All I did was add a CUI button, an "Item Click" method with one line:

    debugger;

    turned on developer tools in the browser and pressed the my button.

    And voila, now I see the whole context of my "Item Click" method with its parameters, their properties, properties and methods of the "window", "document" etc. And now I know about "options".

    Unfortunately this is the only way to do something beyond the documentation examples.

Children