Monday, 22 December 2014

Symmetry error in Ax 2012 R3 CU8

Hello Guys...!

Issue: Symmetry  error in PayrollCalculatePayStatementBenefits class in Ax 2012 R3 CU8



Solution :
Go to AOT-> References-> Add Reference



Browse ste-net.dll file from  C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin
 
Press Ok.

 
 
 
Again do full compilation
That's it....

 
@Rahul Talasila



Sunday, 21 December 2014

How to See Log Files Paths In AX 2012

Hello Guys..

Here i'm sharing information about how to see log file paths in ax 2012

Full Compilation Log :

This is when you compile the entire application and it is located in
%USERPROFILE%\Microsoft\Dynamics Ax\Log\ by default - this is the path found in the configuration of the client. The log name is AxCompileAll.html

CIL Compilation Log :

 This is when you do Generate Full CIL and this can be found in the Server folder of you AX installation similar to this
 C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL and it is called Dynamics.Ax.Application.dll.log



@Rahul Talasila

Saturday, 20 December 2014

How To Export Data Into Excel - Ax 2012

Hello Guys,

In this post i'm showing how to export data into excel.

In this example i'm exporting all number sequence list  in current legal entity .

Example : vend id,custid,paymentjournalnum

Step1 :Copy and Paste the below code in AOT-> Job
Step2: Run the Job
step3: Go to "C" drive and then find the excel sheet Named as "Numseqlist"

static void Numberseq_List(Args _args)
{
   SysExcelApplication  xlsApplication;
   SysExcelWorkBooks    xlsWorkBookCollection;
   SysExcelWorkBook     xlsWorkBook;
   SysExcelWorkSheets   xlsWorkSheetCollection;
   SysExcelWorkSheet    xlsWorkSheet;
   SysExcelRange        xlsRange;
    NumberSequenceReference NumberSequenceReference;
    NumberSequenceTable NumberSequenceTable;
    NumberSequenceDatatype NumberSequenceDatatype;
   int                  row = 1;
   str                  fileName;
    CompanyInfo companyInfo;
   ;
   //Filename
   fileName = "C:\\Numseqlist.xlsx";
   //Initialize Excel instance
   xlsApplication           = SysExcelApplication::construct();
   //Open Excel document
   //xlsApplication.visible(true);
   //Create Excel WorkBook and WorkSheet
   xlsWorkBookCollection    = xlsApplication.workbooks();
   xlsWorkBook              = xlsWorkBookCollection.add();
   xlsWorkSheetCollection   = xlsWorkBook.worksheets();
   xlsWorkSheet             = xlsWorkSheetCollection.itemFromNum(1);
   //Excel columns captions
   xlsWorkSheet.cells().item(row,1).value("NumberSeqId");
   xlsWorkSheet.cells().item(row,2).value("Format");
   xlsWorkSheet.cells().item(row,3).value("Name");
   row++;
   //Fill Excel with NumberseqId,Format,Name fields (only 10000 records)
    companyInfo.RecId = CompanyInfo::findDataArea(curext(),false).RecId;
   while select NumberSequenceReference where NumberSequenceReference.numbersequencescope == companyInfo.RecId
    {
        select numbersequence from NumberSequenceTable where NumberSequenceTable.recid == NumberSequenceReference .numbersequenceId;
        select firstonly1  NumberSequenceDatatype where NumberSequenceDatatype.RecId == NumberSequenceReference.NumberSequenceDatatype;
       if(row == 10000)
        break;
       xlsWorkSheet.cells().item(row,1).value(NumberSequenceTable.NumberSequence);
        xlsWorkSheet.cells().item(row,2).value(NumberSequenceTable.Format);
       xlsWorkSheet.cells().item(row,3).value(NumberSequenceDatatype.referenceLabelForDisplay());
       row++;
   }
   //Check whether the document already exists
   if(WinApi::fileExists(fileName))
      WinApi::deleteFile(fileName);
   //Save Excel document
   xlsWorkbook.saveAs(fileName);
   //Open Excel document
   xlsApplication.visible(true);
   //Close Excel
   //xlsApplication.quit();
   //xlsApplication.finalize();
}


@Rahul Talasila

Wednesday, 17 December 2014

Missing Label File Problems - AX 2012

Hello Guys,

Problem : 

In some situation could happen that after installing cumulative updates there are missing some SYP labels.



Solution : 

1. Stop AOS
2. Delete ALD and AUC files from Microsoft Dynamics AX\60\Server\<instance>\bin\Application\Appl\Standard
// Note : In search type.ald, .alc and delete files

3. Start AOS again.

That's It..

Issue : 
Some times we face the same labels issue after upgrading sql server
Example: upgrading from Sql 2012 to Sql 2014

Solution : 
http://technet.microsoft.com/EN-US/library/hh389762.aspx


@Rahul Talasila

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...