Friday, June 21, 2019

Export Text file and send to User in D365

      str     fileName = test.txt;
str _outputStr = "Test: san: son: Test001";
        TextStreamIo textStreamIo;
       
        textStreamIo = TextStreamIo::constructForWrite();

        if (textStreamIo)
        {
            textStreamIo.write(_outputStr);
            textStreamIo.finalize();
            File::SendFileToUser(textStreamIo.getStream(), fileName);
        }
        else
        {
            warning(strfmt("@SYS65356",fileName));
        }

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...