help! strange problem. running SQL 4.0 SP1
I am trying to reference a function (GetUnitCost) in a codeunit (SalesPrinted) from a form (Y).
The codeunit is CU313 to which I have added the function GetUnitCost which has a parameter of ItemNo and returns a Decimal value. I have compiled the CU.
I have added the codeunit (SalesPrinted) as a global variable to the form (Y). in the form code I have the following line of code:
ItemJournalLine."Unit Cost" := SalesPrinted.GetUnitCost("Item No.");
I saved the form without compiling and then came back into the form and tried to compile and it gives me the error,
"You have specified an unknown variable. GetUnitCost. Define the variable under Global C/Al symbols."
What gives?
Thanks for your input.
0
Comments