Hi All,
I am stuck on an issue - Senario
I have written a code unit, which takes Sales header Id as input parameter. Now I want to call that code unit from Order/Invoice form. I have created a Menu Item at Order button of 'Order' form called 'Call my Code'.
Now I want to call my code unit from this menu item and need to pass Header Id as parameter. Please not, I have created a function in the code unit and I want to run that function. I dont want to call 'RUN' method of the code unit.
Please help.
Thanks in advance.
Arindam
0
Answers
you call your codeunit as follows
Hope this helps
Where shall I write this code. I want to run my code unit from the menu.
For example -
In Order form's Order button we have a list of menus (List,Statistics etc....). Here I have created a menu item. Now I want to run my code unit on click of that particular menu.
Albert
Go to your new Menu Item and press F9 or click View-> C/AL Code and
you will see the OnPush and put your code there.
Albert
Use this
where CU is the codeunit, FUNC is the function defined by you and No. is the sales header/sales document No.
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
Your solution solved my problem.