You control access to the functionality in your application by specifying whether commands are visible and enabled. When you disable or hide commands for you integration, users cannot access the functionality provided by those commands.
One common location for integrations to control access to commands is in the form pre script for the command form. Access (such as registration keys) can be checked at the time the command form is opened. If access shouldn’t be allowed, the commands on the form can be hidden and disabled.
Microsoft Dynamics GP provides two procedures that you can use to control access to the commands for your integration. The Command_HideAndDisable and Command_ShowAndEnable procedures provide a standard way for integrations to enable and disable commands. By using common procedures, Microsoft Dynamics GP can choose to display the commands, but leave them in the disabled state so they cannot be used. This can be useful so that all commands can be seen, such as when testing an application.