Hi,
half of the day I searched for the reason of a “Type ‘Action’ not defined in Function” Errormessage from the NAS. Not it is found. If the NAS touchs an object which has a local or global Variable of Type and (!) somewhere in the code you put an expression on the Actioncodes like this:
IF (lac_Aktion = lac_Aktion::LookupOK) OR (lac_Aktion = lac_Aktion::OK) OR
(lac_Aktion = lac_Aktion::Yes) THEN BEGIN
then NAS will interrupt with the written Errormessage.
It is important to know that the NAS will also crash if it doesn’t run the Code with the Action. In my case the code was placed in another Function in the same Codeunit (as a local Variable). The NAS never runs this code but it crashs when accessing the Codeunit where it is placed!