Multiple ways to check file existance in AX 2012; Client side check, does not work with batch job WinAPI::fileExists(_fileName); Server side check which works for run base batch too public boolean getFileExists(filepath _fileName) { System.IO.FileInfo fileInfo; new InteropPermission(InteropKind::ClrInterop).assert(); fileInfo = new System.IO.FileInfo(_fileName); return fileInfo.get_Exists(); }
A library with Microsoft Dynamics AX, Microsoft Dynamics 365 FinOps and Supply Chain Management, Power Platform, Integrations, development and functional processes, tricks and trip, tutorials and much more....