This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
So what you say is:
You disable the button with:
#avframeworkmanager.avChangeCommandState Objectname(#UOOBNM) Commandname('COMMAND_NEW') Enabled(false)
Which works.....
But when a user clicks on a column of the instance list, the new button becaomes Enabled(true)
Could you clarify what you mean by the user clicking on an instance list column?
1. Do you mean the column heading?
2. Or do you mean on an item in the column which also causes the instance list ‘row’ (item) to become selected?
If it is the second option, then the act of selecting the instance list item would automatically enable all object and instance level commands for the business object.
e.g. If your New command is an object level command then this would cause it to become (re)enabled.
In that is what is happening you can probably solve it by executing the avChangeCommandState method again in the command handler that is executed when the user clicks on the item.
Thanks all for the input. I ended up modifying the avcheckauth routine in the IIP to just not have the commands shown if there was no security clearance for user.