Hi, Chris.
We do log lots of transactions in our app, not only those selected from menus, but also button clicks, drag&drops a.s.o. There is a central function "LogTransaction(<cTransaction>,[<lImportant>])", which is called at the
end of every to-be-logged transaction (since the user may decide not to use the function
after he called it). It writes the date, the time, the name of the user, the transaction text and, if handed, the parameter "lImportant", which creates a warn sign in the transaction log (i.e. customer data deleted).
If you only want to log the name of the menu item, you may change DCDIALOG.CH (or create a clone added to your app before DCDIALOG.CH), which changes this line for "DCMENUITEM":
Code: Select all
[;DC_GetListSet(DCGUI_GETLIST,bGETLIST_ACTION,<bAction>)]
Instead of just adding the "bAction" codeblock to the menu, you may create something like this: "{||WriteTransaction(<cPrompt>),Eval(<bAction>)}"
This would call a function "WriteTransaction" with the caption of the menu item and the action-codeblock afterwards. I'm not sure if this will work in any situation, but it may point into the right direction.