Page 1 of 1
Getting a framework business object name
Posted: Wed Oct 25, 2017 12:24 am
by trossiter
I have two different business objects that both use the same reusable part for their command handler. The command handler has two buttons on it, but I would like to hide the button when the command handler is executed under one business object and show it under the other. I know you can get the command name from the framework in code, but is there a way to do the same for the business object name? I'm not finding it in LANSA documentation.
Thanks.
Re: Getting a framework business object name
Posted: Wed Oct 25, 2017 12:47 am
by trossiter
I think I just answered my own question. I'll just use a different command for the second business object and get the command name.
Re: Getting a framework business object name
Posted: Wed Oct 25, 2017 12:53 am
by jyoung
Re: Getting a framework business object name
Posted: Wed Oct 25, 2017 2:02 am
by TomC
From the command handler source, you can use the following:
To return the business object User Object Type name or caption:
#COM_OWNER.avObjectType
#COM_OWNER.avObjectCaption
To return the command handler User Object Type name or caption:
#COM_OWNER.avCommandType
#COM_OWNER.avCommandCaption