Options

Static variable in XMLPort

asdastyasdasty Member Posts: 26
Hello guys, I'm currently working on connecting my new Codeunit with some XmlPorts. Is it possible to make it in this way:

1. Set global variable in xmlport through Codeunit
CU => XMLPORT

2. Execute some logic in XMLPort
3. Return variable from step 1. from another function
CU => GetSomeGlobalVarFromXmlPort();

As far as I know it's not possible, because every time you'll get a new instance of xml port. Am I right?

Comments

  • Options
    Torben_R.Torben_R. Member Posts: 99
    in the xmlport you create a function i.e. GetVariable with an exit of your variable

    in the codeunit you declare the xmlport as a variable (i.e. testxml).

    then the code
    testxml.run;
    message(testxml.getvariable);

    will give you the variable as a message
Sign In or Register to comment.