Automation

In a code unit i found such a function COMCOM::MESSAGRERECEIVED(… Can someone explain me the significationof :: thanks

This is an event. The “ComCom” automation object has an event called “MessageReceived”. Any C/AL code placed in this trigger is executed when the event fires.

… and the event function is visible since someone put the property “WithEvent” to “Yes” on that COMCOM variable :slight_smile:

“… and the event function is visible since someone put the property “WithEvent” to “Yes” on that COMCOM variable :)” Two questions : 1. Is this a user defined event, because in the CAL symbol menu and in the function list i do not see this Method. 2. How can i create my own event ? thanks a lot

In Globals (or less ususal in Locals) set cursor on the line of ComCom (Communication Component) and view properties… change “WithEvent” to “Yes” and there you go… now there is a new “function” to work with… (Like OnPreDataItem etc…) You cannot create an event of your own AFAIC.