D365FO – AX – Import CSV file in a runnable class in X++

This is a simple example to import a csv file in arunnable class in C365FFO class UpdateProjectQuotationStatusFromConfirmedToSent { public static void main(Args _args) { //Declarations Dialog dialog; AsciiStreamIo file; Array fileLines; FileUploadTemporaryStorageResult fileUpload; QuotationId quotationId; DialogField quotationStatus; DialogField fileSt; container record; SalesQuotationTable salesQuotationTableLocal; SalesQuotationStatus SalesQuotationStatusNew; fileUpload = File::GetFileFromUser() as FileUploadTemporaryStorageResult; file = AsciiStreamIo::constructForRead(fileUpload.openResult()); if (file) … Continua a leggere D365FO – AX – Import CSV file in a runnable class in X++