Hi everybody,
I'm facing an issue which is very weird to me. I can see the C/AL code executed by the 'On Push()' trigger of severals buttons when I'm in debug mode, but once that I'm trying to access it using the C/AL editor in order to make some modifications, the 'OnPush()' code line is empty :shock:
I have a section for each trigger like 'OnValidate()', 'OnPush()', Etc., But each of them is empty.
I don't know if this issue is related with this Topic:
http://www.mibuso.org/forum/viewtopic.php?f=23&t=38517&sid=966bd734c468abd8f03603798894c633
Do somebody have already faced that before?
I don't think is a right problem because I'm super user of my base.
Answers
My Blog - nav.education
Is there any chance the code you see is in different objects?
Maybe the button does not have any code but runs an object through options (actions) in it's properties.
Just make sure this isn't the case before you go looking in other places...
I checked this and I'm really in the same Form the debugger is showing me.
Precisely, that's the problem. I'm actually working on a MenuItem 'OnPush()' Trigger. But When I'm looking in the Menu Designer this MenuItem don't have any Action or RunObject.
When I'm clicking this MenuItem the debugger puts me in the section of the same Form that I'm working on in design Mode. But in design mode there's no sign of this section. They also isn't any code for the MenuButton's C/AL Code the MenuItem belongs to. I only have 2 empty sections (<Control1000000023> - OnActivate() and <Control1000000023> - OnDeactivate()).
OnActivate() and OnDeactivate() belong to the menu button but
OnPush() belongs on the menu item of the menu button.
Try and export your form in Text and search for Control1000000084 to see what it is.
Could it be a hidden control?
By going to the Object Designer, selecting the form and going to File -> Export and selecting Text Format.
I search for 1000000084 and I find the code that I can see In the debug mode (The code between BEGIN and END). It's something like that: (not the real code variable names have been changed for this example)
I have access to the code at least :oops: From the MenuItem Window you select the MenuItem that you want and you press F9.
Thanks for your precious help. I was trying to do à "right click" thing but never thought to simply press F9 :oops:
I'll try this to the others buttons and keep you up to date.
[edit]It works for the others buttons. Thank you for your support.[/edit]