As you may be aware the UK has at last implemented the programming exam for Navision developers and I have been revising from the exam outine supplied by Navision UK. The C/AL programming section of this document says you must know “the three types of triggers found in C/SIDE objects”. While I am aware of most of the triggers I did not know they fell into three categories. Could it mean 1. Object triggers (on tables, fields, forms, reports, dataitems etc.) 2. Control triggers (on textboxes, buttons etc.) 3. WithEvent triggers on Automation variables. Does anybody have an idea about this? Thanks in advance… Chris.
I’m not quite sure what they mean by “triggers” - the debugger option “breakpoint on triggers” actually lets execution stop upon entering each single function, be it a predefined trigger or a user defined function. Therefore I’d humbly suggest the categories 1. Documentation trigger 2. Predefined/automatic/internal/etc. trigger 3. User defined function. Please forgive me if this turns out to be complete and utter nonsense [;)]
I think you are right Chris, but I think field are controle trigger.
From an introduction to C-AL Programming section of the NA Development course (I think this was based on 3.10, but it shouldn’t matter): There are three kinds of triggers that you see here. The first is the “Documentation Trigger”. This is not really a trigger and no code in this trigger will be run. Instead, you can use the Documentation trigger to write any sort of documentation you want for this object. Many people use this space to document their modifications to standard objects. Every object has a Documentation trigger. The second kind of trigger is an “Event Trigger”. The name of these triggers always starts with “On”. The C/AL code in an event trigger is executed when the named event occurs. For example, the code in the OnRun event trigger is executed whenever this codeunit object is run. In this case, since there is no trigger code, nothing would happen. Each object has its own set of predefined event triggers that can be programmed. The third kind of trigger shown here is a “Function Trigger”. These triggers are created whenever you create a “function” in an object. The C/AL code in this function trigger is executed whenever the function is “called”. You will learn more about creating and calling functions in another section. You will learn more about event triggers in your Navision Attain programming class.
Chris, I just can’t believe I was actually right with my somewhat wild guess [:0]
Thanks Chris, That classification of triggers seems logical. Good try Heinz I’m sure your guess was not that “wild” but maybe you should buy a lottery ticket this weekend! Regards, Chris.
I had this on my exam… How could I forget this important information?
quote:
Originally posted by CMGW
Good try Heinz I’m sure your guess was not that “wild” but maybe you should buy a lottery ticket this weekend!
Good idea, Chris. Today we have a 2M € jackpot in our national lottery, and the deadline is 18:00… [:o)]