I have tried this and I have a Codeunit like this.
MESSAGE('HER ER før RESULTATET: %1',Comp);
form1.RUNMODAL;
MESSAGE('RESULT: %1',Comp);
SetSelskap(Selskap : Text[50])
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?
](./images/smilies/eusa_wall.gif)