Skip to main content

Posts

Showing posts with the label VendTable

How to get Customer,Vendor VAT Registration Number by code in Axapta

To get Customer,Vendor VAT Registration Number by code in Axapta in 2012 version you can try below code in data method on table label then you can use the method in string control on form . This code will work perfectly . display name Get_TaxRegistration() { TransDate _transDate = systemDateGet(); DirPartyLocation dirPartyLocation; TaxRegistration taxRegistration; TaxRegistrationTypeApplicabilityRule taxRegistrationTypeApplicabilityRule; if (_transDate) { dirPartyLocation = DirPartyLocation::findByPartyLocation( this.Party, this.invoiceAddress().Location); if (dirPartyLocation) { select firstonly validTimeState(_transDate) taxRegistration where taxRegistration.DirPartyLocation == dirPartyLocation.RecId join RecId from taxRegistrationTypeApplicabilityRule order by taxRegistrationTypeApplicabilityRule.IsPrimaryAddressRestricted desc

Resolved:SQL error after CU7 update to AX2012 R3 on Execution of query

Following SQL error throwing  after CU7 update to AX2012 R3 on Execution of query. Error: SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]String or binary data would be truncated. SQL statement: UPDATE T1 SET ACTNAME=((T2.DISPLAYVALUE+?)+T4.NAME),NONLEDGERACCOUNTNAME=T4.NAME,RECVERSION=? FROM tempdb."DBO".t12143_065EB03A5044473883A01845DF64A84A T1 CROSS JOIN DIMENSIONATTRIBUTEVALUECOMBINATION T2 CROSS JOIN VENDTABLE T3 CROSS JOIN DIRPARTYTABLE T4 WHERE ((T1.PARTITION=?) AND (T1.ACCOUNTTYPE=?)) AND ((T2.PARTITION=?) AND (T2.RECID=T1.LEDGERDIMENSION)) AND (((T3.PARTITION=?) AND (T3.DATAAREAID=?)) AND (T3.ACCOUNTNUM=T2.DISPLAYVALUE)) AND ((T4.PARTITION=?) AND (T4.RECID=T3.PARTY)) Solution: Find then Actname column in table which are currently used for query then increase then length of column as required or change Extended datatype which have more size then current. For example -Change EDT from Name to DirPartyName for particular column .

ERD Account Payable and Account Receivable in ax 2012

How Ax code is working

There are lot of Technical who write code in Axapta but they did not understand meaning of all lines of code only know output of code. My tips if you relate axapta code with c++ then you can understand it easily. If you understand concept of class and its object means oops concept then you can learn Ax faster. In Ax code is depends upon object. We can create object for Tables,class,View,Forms,Macros,maps etc. and each object execute on its own value. If you have very good in pointer concept ,object concept then you can under axapta very easy. Second thing you should know basic tables in Standard axapta like ledgertable, ledgerTrans, VendTable, vendtrans etc.  Without knowing functionality of process you can not do anything with code. So I hope above tips can help you to start leaning of Axapta. So good luck.