I have tried this and I have a Codeunit like this.
MESSAGE('HER ER før RESULTATET: %1',Comp);
SetSelskap(Selskap : Text)
Comp := Selskap;
MESSAGE('Value of Comp: %1',Comp);
Then I have Form, form1 whch gives a value to Selskap by calling the function Setselskap. The Message(Value of Comp: shows that the value of Comp is set correctly. and Comp is a variable in the Codeunit.
But at tyhe code( MESSAGE('RESULT',%1',Comp); THE VALUE OF Comp IS LOST
What is wrong with this code?