hi
how to send parameter to codeunit?
thanks
this is my code in codeunit
OnRun()
SalesInvLine.FINDFIRST;
SalesInvLine.SETRANGE(SalesInvLine."Sell-to Customer No.");
SalesInvLine.SETRANGE(SalesInvLine."Document No.",Parameter);
SalesInvLine.FINDSET;
0
Comments
Next declare a variable that's linked to your codeunit: MyCodunit
Create a function in the same codeunit called, for example, SetParameter: Before you call the (OnRun) of the codeunit first call your new function SetParameter:
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
Is it standard Codeunit or your custom made codeunit?
If it is the standard CU, I prefer the one suggested by Luc:
If
But if you use your own design CU, you can try this one:
1. Add the Parameter to the CU.
2. Run the CU with the passed parameter.
Andwian
I think this is not possible, you have to create a function.
I forgot that on OnRun() trigger, we could not add the parameter
Andwian
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
just like this
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Isn't it a REPORT, instead of CU?
Andwian
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
owww yeah sorry i forgot to tell
i change from codeunit become report
because the client doesn't have codeunit
Andwian
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Andwian