|
29.05.2010, 03:18 | #1 |
Участник
|
emeadaxsupport: Cost accounting journal excel import dialog fails to appear COSExcelImport
Источник: http://blogs.msdn.com/b/emeadaxsuppo...celimport.aspx
============== This week I have been investgating an issue with the Excel import in Cost Accounting->CostTransactions->Import button. When I click the import button the Excel import wizard comes up, I click next, then I click "Open workbook". At this point I expect to see an Excel "open file" dialog box, but I don't get one, nothing appears to happen. However if I press alt+tab I find that the dialog box is there in the background it was just that it didn't get focus when it opened, so I can find my Excel file and carry on with the import. It is possible to allow the Excel dialog to gain focus automatically with a small code change in Classes\COSExcelImport. X++: public boolean openWorkBook() { #COSStrings COMVariant fileName; COMVariant fileFilter; int infoLine = infolog.line(); ; fileName = new COMVariant(); fileFilter = new COMVariant(); fileFilter.bStr("@SYS28576" + ' ' + '(*.xls; *.xlsx), *.xls; *.xlsx'); try { WinAPI::setForegroundWindow(WinAPI::findWindow('', 'Microsoft Excel')); //NEWLINE fileName = application.getOpenFileName(fileFilter); if (!fileName.boolean()) { // Cancel button was selected. info("@SYS59931"); return false; } else { workBooks = application.workBooks(); workBooks.open(fileName); workSheets = application.worksheets(); //Get access to the collection of worksheets } } catch (Exception::Error) { infolog.clear(infoLine); throw error("@SYS59929"); } application.visible (false); return true; } This issue only occurs with Windows 2008 R2 and Windows 7. It occurs in AX4 and AX2009. It has been officially registered with Microsoft and will currently be dealt with in a future version/service pack, of course we will re-evaluate that status if we find a company that is significantly impacted by it. Источник: http://blogs.msdn.com/b/emeadaxsuppo...celimport.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|