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
  • There are a couple of Aras community projects on github regarding CUI elements that are very helpful. Just search for "aras cui github".

    They cover the most important stuff you need to know. But some of them may be outdated.

    More fancy stuff like the "init Methods" you have to find out on your own.

    Some general tip as soon as you want to build more intelligent buttons

    1. Know the names most important CUI locations (depends on version cause Aras did some restructuring once, which was great fun)
    2. Try to understand how Aras names the CUI Methods.
    3. Try to understand the Promote/MassPromote button (it contains a lot of little UI highlights)

Children