Thursday, April 6, 2017

Batch script for deleting AUC and KTI files

This post contains a small batch script which deletes all *.auc and *.kti files normally requires when you are willing to clear user caches.

Save this below script in a file and save it as *.bat extension. Execute this file and it will deletes *.auc and *.kti files.

@echo off
cls
setlocal
:PROMPT
SET /P AREYOUSURE=Delete AX User Cache (Y/[N])?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END

CD %Userprofile%\AppData\Local
Del *.AUC
Del *.KTI

:END
endlocal
Pause

Tuesday, April 4, 2017

Print Management Dialog X++

Sometimes you might need to open up print dialog using X++ code to let user choose what print medium to be used for printing.

This post shows a code sample where sales invoice report is printed using X++ code but before printing Print Management dialog is prompted to choose destination for print as shown below.