Skip to main content

Posts

View creation from other database from SQL for Ax database

To create view  from other database from SQL for Ax database you can get hint by below  script. SET QUOTED_IDENTIFIER ON GO Create VIEW [dbo].[TestCustomer] AS SELECT [CUSTGROUP] ,[ACCOUNTNUM] FROM MicrosoftDynamicsAX.dbo.CUSTTABLE group by [CUSTGROUP] ,[ACCOUNTNUM] ; GO Source database is MicrosoftDynamicsAX and destination is testDb in this clip. Just see clip to create view from custtable to other database new view .. Just need to execute script in query editor of SQL. Same way you can include more columns by alter alter THANKS FOR YOUR PATIENT ON WATCHING CLIP.YOU CAN SUBSCRIBE ON MY YOUTUBE CHANNEL TO GET FUTURE UPDATE TO IMPROVE YOUR KNOWLEDGE. GROUP BY IS REQUIRED TO MAKE VIEW  READ ONLY. SO ITS IMPORTANT.

Calculate Time Consumption in hours in Ax 2012

Code to get total time consumed between two times means if time one is 14:10 and time two is 15:40 then you want to get difference time in hours only like in this example it will be 1.5 hours. Getting time in hours in very difficult but you can get it easily by writing one simple method. # int seconds, minutes, hours, totalTime; # str timeStr = "",minstr=""; # # if (_startTime > _endTime) # { # totalTime = _endTime + (str2time('23:59:59') - _startTime); # } # else # { # totalTime = _endTime - _startTime; # } # # seconds = totalTime mod 60; # minutes = totalTime mod 3600 div 60; # hours = totalTime div 3600; # # if (hours > 0) # if (hours == 1) # timestr = timeStr + strFmt("%1", hours); # else # timestr = timeStr + strFmt("%1", hours); # #...

Display time difference in hours in axapta

To Display time difference in hours in Axapta  you can use below code where timeConsumed is a method to get difference between from time and to time. You need to convert string to time first to get the right value. TimeofDay fromTime,toTime; // Time variables ; fromTime = str2time("8:50 am"); toTime = str2time("10:50 am"); info(strFmt("%1",timeConsumed(fromTime,toTime)));

Ax 2009 GST Installation hints

Prerequisites for GST Hotfix installation at Ax 2009 1.GST patch can only be installed for AX2009SP1 plus Consolidated GLS Layer for India (KB960013).  The detail information can be found at Microsoft Partner source link. Or Its  recommendation  you upgrade to RU8 for future better AX2009 hotfix supporting. However, RU8 is not a prerequisition to install GST patch but If its upgraded to RU 8 then no need to apply  (KB960013) otherwise it will show message KB already installed like that. 2.Before you install India GST hotfix, please make sure you have installed AX2009 hotfix KB971935, KB2028696, and KB971154. You can download hotfix from Microsoft partner source link for application and kernel both version.   Restart AOS and full compile after each KB gets installed.   You must Restart AOS and full compile after install the GST patch before open AX client.  3.Install both the kernel fix and the application fix  for India GST. ...

Classes to print,post sales order in ax 2012

1/To interacting with SalesEditLines form during sales invoicing the class is SalesFormLetter_Invoice . \Classes\SalesFormLetter_Invoice 2.For Creating journal data for sales order during invoice is SalesInvoiceJournalCreate \Classes\SalesInvoiceJournalCreate 3.For Posting a journal for sales order you can using below class for any code debugging and issue or customization. \Classes\SalesInvoiceJournalPost 4. If you want print customize sales order invoice report in Ax for sales order invoice then you can make changes in below class. \Classes\SalesInvoiceJournalPrint   Method to call report is printJournal. Path of method is as below.   \Classes\SalesInvoiceJournalPrint\printJournal 5.For Creating parm data during sales order  invoice below class you can check . \Classes\SalesFormletterParmDataInvoice

Hotfix for Accounting framework issue in Ax 2012 R3 CU11

KB number 3134000 is for the issue if Transfer to GL should not run taxlink queries for documents with no tax in Accounting Framework KB number  3100992  is for the issue if Introduction of Accounting Source Explorer and Source Document Reference Identities in Accounting Framework KB number  3134000  is for the issue if Final Relieving of a vendor invoice is incorrect when the product receipt is matched to a partial invoice before and after being corrected in  Accounting Framework KB number  3147787  is for the issue if SDRI mappings are not being honored for vendor invoice in  Accounting Framework

Advance query filter in Ax 2012

As you know like wildcard operator to filter bunch of record in Axapta grid. In Ax 2012 you can use like wild card operator with query build range object also. QueryBuildRange QBR; QBR =SysQuery::findOrCreateRange(DS.dataSourceTable(tablenum(custtable)),fieldNum(Custtable,AccountNum)); QBR.value(SysQuery::valueLikeAfter(testTxt.text())); In above example we used value like after same way you can use valuelike also. Other you can use like SysQuery::valueUnlimited if there is no value for range purpose.