Disable record creation/deletion from menu, but allow from AppleScript
Hi, it's me again. :-)
In the FM Pro 11 Advanced runtime application I'm creating, the users are not supposed to create or delete any records manually, i.e. from the menu or status toolbar. That is, because this would leave the database in an inconsistent state. The way the users are enabled to create and delete records is via FM scripts and AppleScripts (both native and external), which take care of consistency.
Now, I have figured out that I can simply remove those menu items from my custom menu, and the users won't be able to create/delete records any more. Unfortunately, this also seems to block create/delete events sent from AppleScripts on a computer where only the runtime is installed, not FM 11 Pro Advanced ("Event failed" upon "create new record" for example, even when the AppleScript is native, i.e. included in the FM app). How can I prevent the user from accidentally generating an invalid state by creating/deleting records manually, but at the same time maintain the possibility to create/delete records from (Apple)script?
Oddly, it works on a mac that has FM Pro 11 Advanced installed...