Hello,
I want to create a generic function that will accept any type of variable as a first parameter and a text variable parameter. The text parameter will be tried to be evaluated to the type of the first parameter.
For example:
TestFunction(DateVariable,'13.02.2012')
DateVariable should be set to 13022012D
TestFunction(IntegerVariable,'345')
IntegerVariable should be set to 345
ect..
For this I defined the first parameter as variant and worked as desired. But because it is not a var variable, I cannot get the evaluated value outside TestFunction. So I defined it as var, but NAV wants only variant type in this case.
Is it a solvable problem or restrictions of NAV prevent such a generic functionality?
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005
0
Comments
In TestFunction you have something like
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Something like: