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

Disabling the flight in D365FO (CHD - Tier 1)

 INSERT INTO dbo.SYSFLIGHTING(FLIGHTNAME, ENABLED)  VALUES ('<FlightObjectName>_KillSwitch', 1)  or  INSERT INTO dbo.SYSFLIGHT...