Skip to main content

Posts

How to delete a company in Microsoft Management Reporter 2012

1.        Make a complete backup of your Management Reporter database in SQL. 2.        Start the Configuration Console. 3.        Under Management Reporter Services, click Companies. a.        Before you can delete a company, you must remove all associations with any tree or report definitions. 4.        Select the company that you want to delete. 5.        Click Delete Company.

Select Which ERP and why

1. Very small organization where other than accounts other departmental functions like sales-distribution, purchase, stores-inventory, production, fixed asset, supply chain , financial decision making is not that important they can carry on with TALLY or Tally ERP but who have such operation or will have in future should use Matured ERP like Dynamics Ax,SAP ,Infor etc. 2. Who have out grown with tally or tally ERP and don't want to waste time and money just by implementing cheap local ERP and cant's afford Branded ERP should go with domestic matured solution like NAVISION. 3. People should not choose ERP because of the product itself but choosing right vendor is more important as after implementation support ensures your investment was right or have gone wrong. 4. Branded ERP helps in building image of the company as well as to the users but the organization needs to change its way of operation as per the software which is not the case with Domestic Matured ERP where they map

How to Upload License in Microsoft Dynamics AX 2012

To Upload License in Microsoft Dynamics AX 2012  you need to  follow below steps. Go To System administration > Setup > Licensing > License information. Then Click Load license file to import the license codes from a file and select license file. Then Click on OK button. Then message will appear and asks whether you want to synchronize the database. Click Yes and complete the process.

Code to set range in lookup for SSRS Report in Ax 2012

This is sample Code to set range in lookup for SSRS Report in Ax 2012 in UI Builder class. First create lookup method in this sample code EmpLookUp is method for lookup then using post build and build method you can get lookup with range. public void build() { contract = this.dataContractObject(); dialogReportNatureofSaration = this.addDialogField(methodStr(TestSummaryContract, parmModeofSeparation),contract); dialogreportEmpCode = this.addDialogField(methodStr(TestSummaryContract, parmEmpId),contract); dialogreportEmpCode.value(""); dialogReportNatureofSaration.value(""); } private void EmpLookUp(FormStringControl EmpLookUp) { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildDataSource queryBuildDataSourceLocal; QueryBuildRange queryBuildRange; SysTableLookup sysTableLookup; ; { sysTableLookup=SysTableLookup::n

Call SSRS Report through controller class in ax 2012

To Call SSRS Report through controller class  Go to main method in controller class and write below code to call the report. SSRSRPTController controller; controller = new SSRSRPTController(); controller.parmArgs(args); controller.parmReportName(ssrsReportStr(TestReport, report)); controller.parmShowDialog(true); controller.startOperation()

Call SSRS Repart class and Table data through Job in Ax 2012

To SSRS Repart class and Table data through Job in Ax 2012 you can try below code. TestTmp tempTable; TestDP dataProvider = new TestDP(); TestContract contract = new TestContract(); contract.parmCustAccount("Test00001"); contract.parmNofSample(8); dataProvider.parmDataContract(contract); dataProvider.processReport(); tempTable = dataProvider.getTestTmp(); while select tempTable { info(strFmt("%1,%2,%3,%4",tempTable.CurrencyCode,tempTable.SalesId,tempTable.Monthname,tempTable.CurrentMonthSum)); } Here TestDP is data provider class for SSRS Report and TestContract is contract class . To pass parameter value we used parmCustAccount and parmNofSample method from contract class. tempTable is temparary table used in DP class.

How to get Country Name by Country code for Sales order in Ax 2012

To  get Country Name by Country code for Sales order in Ax 2012 you can try below code. LogisticsAddressCountryRegionTranslation::find (LogisticsPostalAddress::findRecId (salesTable.DeliveryPostalAddress).CountryRegionId,'EN-US').ShortName Like code is SAU then if you want to display name of SAU as Saudi Arabia then you need to find it from LogisticsAddressCountryRegionTranslation table .

Hide dialog for SSRS Report in ax 2012

To Hide dialog for SSRS Report in ax 2012 you need to go to controller class and follow below steps. Go to Controller class then go to  main method of class. Find  statement : Controller.startOperation(); then specify the below statement to hide dialog box which used for range selection. Controller.parmShowDialog(false); To show dialog you can pass value true instead of false.

Code to call Display method in Workflow class in Ax 2012

If you want to show display method of table in workflow designer then you need to write method on table and class . For example table method to get customer credit limit value. display AmountMST Cust_CreditLimit() { ; return CustTable::find(this.CustAccount).CreditMax; } Then go to document class for e.j. \Classes\PurchTableDocument and create new method like this. public AmountMSTParmCreditLimit(CompanyId _companyId, TableId _tableId, RecId _recId) { CustTable CustTable; select CustTable where CustTable.recid==_recId; return CustTable.Cust_CreditLimit(); }

Code to get date time difference in ax 2012

This is a sample example to get date time difference in ax 2012 TransDateTime dateTime_a, dateTime_b; date date1, date2; int64 c; #define.NoOfHrsInADay(24); dateTime_a= 2014-09-26T11:59:59; dateTime_b= 2014-09-19T08:50:50; c = DateTimeUtil::getDifference(dateTime_a,dateTime_b); date1 = DateTimeUtil::date(dateTime_a); date2 = DateTimeUtil::date(dateTime_b); c = c - (date1-date2)*(#NoOfHrsInADay)*60*60; info(strFmt("%1 day, %2 hrs.",(date1-date2), c div 3600)); Output will be like this:-7 day, 3 hrs. I hope it will help you in your date  time troubleshooting.

Code to Create On Account Transaction for Project in Ax 2012

Path for On Account Transaction for Project is as below. Project management and accounting/Common/Projects/All projects/  On Account Transactions This is Code sample to Create On Account Transaction for Project in Ax 2012. You need to declare required variables. _ProjTable =ProjTable::find(_projId); projOnAccTrans.clear(); projOnAccTrans.ProjID = _projId; projOnAccTrans.TransDate = _str2Date("3/11/2015",123); projOnAccTrans.editTransactionOrigin(true,ProjOriginOnAcc::Milestone); projOnAccTrans.Description = _Description; projOnAccTrans.CurrencyId = _Currency; projOnAccTrans.TotalSalesAmountCur = _SalesPrice; projOnAccTrans.TransId = ProjParameters::newTransId(); projOnAccTrans.Qty=_Quantity; projOnAccTrans.DefaultDimension=_ProjTable.DefaultDimension; projOnAccTrans.projInvoiceStatus(); projOnAccTrans.insert