Posts

Showing posts from September, 2017

Reading data from Common buffer

trvExpDataAreaId = CompanyInfo::findRecId(buffer.(fieldnum(TrvExpTable, LegalEntity))).DataArea;

How to find file type either .XLSX or .CSV AX 2012

static void fileType(Args _args) {     Filename filepath;     Filename filename;     Filename fileType;     str fileNameString,fileNamePath;       fileNamePath=@"D:\Sreekanth\3729\Hour rate2.csv";     [filepath, filename, fileType] = fileNameSplit(fileNamePath);     fileNameString= filename + fileType;     info(strFmt("filename=%1 \nfileType=%2",filename,fileType)); }

Global cache

Form Init method after super /// <summary> /// When form opens it will set the container value /// </summary> /// <param name="_handle"> /// habdle buffer will come from TrvExpTable init method /// </param> /// <remarks> /// When form opens it will set the container value /// </remarks> public static client void addHandleToCache(int _handle) {     #define.CACHE_OWNER('TrvExpTable')     container   con;     int         hWnd,i;     if (infolog.globalCache().isSet(#CACHE_OWNER, curUserId()))     {         con = infolog.globalCache().get(#CACHE_OWNER, curUserId());     }     for (i = conLen(con); i >= 1; i--)     {         hWnd = conPeek(con, i);         if (!WinApi::isWindow(hWnd))         {             conDel(...

Event click on ESC

When we click ESC button, task() method will call.