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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...