Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Wednesday, January 16, 2019

Filename handling in X++

Hi,

Check the file existance,
System.IO.File::Exists(fileName)

Copy the file A to B
System.IO.File::Copy(fileName, FileB);

Delete the file
System.IO.File::Delete(fileName);

Get only file name from the path URL.

System.IO.Path::GetFileName(fileName);
System.IO.Path::GetFileNameWithoutExtension();
System.IO.Path::GetExtension(fileName);

Regards,

Thursday, December 27, 2018

Code to fetch the form Notes in AX 2012 / D365

Hi,

Print FormLetterRemarks::find( SalesOrder.LanguageId, FormTextType::SalesPackingSlip).Txt;

You can get all the form notes by selecting the enum FormTextType::

Regards,
Alfasith

Get a table ID in SQL - D365

Hi select ID from SysTableIdView where  SysTableIdView .Name = 'CustTable' Regards,