Monday, December 22, 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, December 21, 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, December 20, 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, December 17, 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

Friday, November 14, 2014

How To Add Company Logo To SSRS Report

Hello Guys..

Here i'm sharing steps how to add company logo to a ssrs report.

Step1 :

-> Add Extended Data Type "BitMap" to your table and name it as "CompanyLogo".
-> Add Extended Data Type "NoYesId" to your table and name it as "PrintLogo".

Step 2 :

-> Go to insert method of your ssrs report DP class and paste the below code before yourtable.insert();

if (conLen(FormLetter::companyLogo()) == 0)
    {
        yourtable.PrintLogo = NoYes::No;
    }
    else
    {
        yourtable.PrintLogo = NoYes::Yes;
        yourtable.CompanyLogo = FormLetter::companyLogo();
    }

//Note : Change table name

Step 3:
-> Edit your ssrs report design in visual studio.
-> Insert Image as shown in the below screen shot
-> Then go to image properties
-> In the properties go to "Use this field" and paste the below code and change the data set name

=IIF(First(Fields!PrintLogo.Value, "datasetname") = "Yes", First(Fields!CompanyLogo.Value, "datasetname"), "")

-> Select company logo type in the "Use this MIME type"
-> Save and then deploy the report ..

That's It ... :)




@ Rahul Talasila

Monday, November 3, 2014

How To Show Limited Records In a Form Info Part

Hello...!

In this post i'm going to show how to show Limited Records In a Form Info Part.

Example : Top 10 Vendors (AP-> Vendors)


In this example i'm going to show only top 5 vendors

Steps :
-> Open related info part(VendTop10VendorsByPurchase)
-> Go to infopart(VendTop10VendorsByPurchase) Properties and change Caption to Top 5 Vendors
-> Expand infopart(VendTop10VendorsByPurchase) ->Layout-> Main properties and change Rowcountwhensmall 10 to 5
->save and close .



Now we can see only 5 records... :)



@ Rahul Talasila

There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs. The InnerException message was 'Element 'http://tempuri.org/:queryBuilderArgs' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/XppClasses:SRSQueryBuilderArgs'

There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs. The InnerException message was 'Element 'http://tempuri.org/:queryBuilderArgs' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/XppClasses:SRSQueryBuilderArgs'........................................

Some times we get the above error while running reports in Axapta 2012. To resolve this issue we need to delete usage data in the AOSserver.


Solution : 

Step 1 -> Connect to sql server and go to axapta database(MicrosoftDynamicsAx) and delete all records in dbo.SYSCLIENTSESSIONS table.

Step 2-> Close the AX 2012 client to clear any in-memory elements.

Step 3-> Stop the Microsoft Dynamics Server service on the Application Object Server (AOS) to clear any in-memory elements.

Step 4-> Delete the application element cache files (*.auc),(*.KTI) from the Local Application Data folder.

C:\Users\AOSAccount\AppData\Local  (Delete the all the AUC and KTI files)

Step 5-> Delete VSAssemblies from the Local Application Data folder.

C:\Users\youruserid\AppData\Local\Microsoft\Dynamics AX\VSAssemblies

Step 6-> Start the service




Note : Make sure show hidden files,folders,and drivers option enabled

@Rahul Talasila

What is the primary purpose of using a Solution in Microsoft Power Platform & ALM?

As organizations embrace low-code development with Microsoft Power Platform , it becomes essential to manage and govern apps, flows, and dat...