Skip to main content

Posts

Definition and use of Maps in MSD axapta

Definition and use of Maps, how AddressMap (with methods) is used in standard AX Maps can unify the access to similar columns and methods that are present in multiple tables. Maps are elements that wrap table objects at run time. We can associate a map field with a field in one or more tables. This association enables to use the same field name to access fields with different names in different tables. Map methods enable us to Create or Modify methods that act on the map fields

Question and answers on Reports in MSD axapta

Q)what are the important methods on report? Ans: fetch, send, dialog, getfromdialog, pack, unpack programmable section - control number - we can execute the ps with e element.execute(controlNumber) in the fetch method Q)What is the difference between auto-design and generated design? Ans: Generate design will not give the printing options of print totals, print grand totals Q) How to create a Report template ? Ans: You can refer to existing templates and can replicate the logic pageno - element.page(),companyname

Some important question and answers on forms in MSD axapta

Q)when you open the form - what methods/calling sequences ? Ans:init(), run(), executequery() Q)When you close the form? Ans:canclose()- boolean, close() Ok command buton - closeok(), canclose(), close() Q)when you create a new record? Ans:Ctrl + n, create of ds, initvalue() of ds, initvalue() of table Q)how do you do filteraions on the forms? Ans: Executequery and use queryBuildRange Q)Enabling and  disabling controls ?   Ans:active method of data source Q)How  do you link the datasources on the form?? Ans: join source and link type property Q )How many link types are available on the datasource?? Ans:delayed, active, passive, inner join, exists join, non exists join, outer join Splitters [sysformsplitter_x, y, z] Q )How  to you pass values from one form to another form - Ans: menuitemButton - Args[formrun] Q )what is args class?? Ans:Args is arguments class which will help to pass values from one form to another, object to obj

Interview question and answer for Data dictionary in MSD Axapta

Table - collection of rows and columns EDT(Extended datatype) - Inheritance, code easy readability, lookups,- 2 RELAtions [Normal and RFF [where clause] example : select * from custtable - is normal select * from custtable where gender == female is RFF How to add columns to the Lookups [Index, Titlefield1, 2 or autolookups] Q) How to get lookups?? In 3 ways - EDT, AutoLookup,Relations Q) what is base enum??? Set of literals or constants which will never change - example [week - s,s,m,t,....] enums are stored as integers and max - 250 can be accessed by using :: [scope resolution] Indexes why do we use index ?- faster performance in select queries Not to allow duplicates FieldName Followed by Idx = AccountNoIdx Field groups: Autoreport - ctrl + p Autolookup almost all the fields should fall under a fieldgroup - on the forms - field groups will form as Group control Relations on table : How one table is related or linked to another Normal -

Some interview question and answer for classes in MSD axapta

1) ACCESS Modifiers [Public, private, protected, static, display] 2) Is multiple inheritance possible in AX?? No It can be achived through interfaces. Interfaces : It does not have method definition] void calculate() {} class classz implements interface void calculate() { a +b; } 3) Is method overloading possible, or function overloading possible in AX ??? No - it does not allow to create another method with same name 4)Abstract and final key words abstract - no need to create object, y?? when we know that we have to create object of child classes only, I will make the class as abstract and i use the concept of constructor controlled inheritance construct(str _bankName) { swtich() {} }

Why You selected Ax for your career MSDAX

AX is a very good ERP which I heard and it supports Tier1 to Tier3 companies It can easily integrate with all other Technologies[sql server, biztalk, ssis, ssrs, MS office] Programming seems to be very similar to .net and I feel very comfortable Also, AX is easy on customization. AX is pretty reasonable when compared with other ERP's. Its good user friendly. It support re-usability means you can develop scenario to implement same things in different clients. 

SSRS Report deployment Error in MSD Axapta EP

I am getting following error on report (SSRS) in EP for axapta. Deployment failed un xpectedly with the message: Invalid URI: The format of the URI could not be determined. See the log file for further details. The deployment log file can be found at My Observation. In AOS there is both sql 2005 reporting service and 2008(Database in sql 2008) exists As per my views if We remove installation of sql 2005 reporting service then problem can be resolve. Please give your comment on this latest error. The deployment log file details are as below Could not load file or assembly 'Microsoft.Dynamics.AX.Fim.PaymentService, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)  

Enterprise Resource Planning Timeline MSDAX

Physical updating quantity in the unit nos must me other than zero for purchase order in axapta

I am getting this error while posting purchase order on entering receive now qty " Physical updating quantity in the unit  nos must me other than zero" for purchase order posting in axapta I search lot of things from inter net and got following observation. 1.Go to the main table of the Unit Id form, and then on the setup tab, there are the decimals. Default there is 0 (means no decimals), change it for this unit decimal to 2 to enter unit quantity with decimal like 1.23 etc. 2. Debug the following class and try out following code in method . Classes\InventUpd_Financial method initUpdate, insert at line where its required: if(abs(physical) < 0.00001) physical = 0.00; method updateFinancialReceipt, insert at line where you got some value for add qty less than zero on point: if(abs(addQty) < 0.00001) addQty = 0.00; 3. For Ax 4.0 To apply this , change the code in the decreaseQty method and in the increaseQtyOverdelivery method in the WMSOrderTransType

Show Random number in MSD axapta

To Show Random number in axapta you can try below code through job. Random is class name which has nextInt method to get next random number. Random Random = new Random(); int RandomNo,RandomwithMod; ; RandomNo=Random.nextInt(); RandomwithMod=Random.nextInt() MOD 1000; info(Strfmt('%1%2',RandomNo,RandomwithMod));

display current system time in MSD axapta

To display time in axapta,timenow,display current system time in axapta you can try below code in job. Only timenow() will not display in time in time format it will display like number but to show time in time format you can try below code. time2str(timenow(),1,1) To show in message box info(time2str(timenow(),1,1));

How to get purchase invoice amount total at the time of invoicing in MSD axapta PO

To  get purchase invoice amount total at the time of invoicing in axapta Purchase order you can try below  code in a method and just need to call that method on any event to get show total amount which will be invoice amount. vendPackingSlipJour _vendPackingSlipJour_1; real TotalInvoiceAmt; purchParmTable parmtable; purchParmUpdate parmupdate; PurchId _PurchId; PurchTotals purchtotal; ; While Select parmtable where parmtable.ParmId == PurchParmTable.ParmId && parmtable.Ordering == DocumentStatus::Invoice { Select parmupdate where parmupdate.ParmId == parmtable.ParmId; _PurchId = parmtable.PurchId; if(parmupdate) { purchtotal = PurchTotals::newPurchParmTable(parmtable, PurchUpdate::All, AccountOrder::Auto, parmtable.ParmId, _PurchId, PurchParmTable.Ordering); purchtotal.calc(); TotalInvoiceAmt+= purchtotal.purchTotalAmount(); } } You can get total after select single packing slip or multiple packing slip.

Start Ax client in Single user mode MSDAX

To run Ax in single user mode you need to reject new user from online user form as following steps 1. Click Area Page node: Administration -> Online users. Form name: Online users Fig 1 2. Switch to the Server Instances tab on the Online users form. Fig 2 3. Click the Reject new clients button. Form name: Dialog Fig 3 4. Click the OK button. 5. Close the Online users form. Same as Fig 2 Accept New Client To Accept new user you can follow step 6 to 9 6. Click Area Page node: Administration -> Online users. Form name: Online users Same as Fig 2 7. Switch to the Server Instances tab on the Online users form. 8. Click the Accept new clients button. 9. Close the Online users form.

Create Duplicate company account in MSD axapta

To Create Duplicate company account in axapta you can follow below steps. 1. Click Area Page node: Administration -> Company accounts. Form name: Company: , Fig 1 2. Click the Duplicate button. Form name: Duplicate company accounts 3. Change Duplicate to company accounts from '' to ' tst'. 4. Change Company accounts from '' to ' tst'. 5. Click the OK button. Fig 3 7. Make sure the selection is changed in table Company data to: Company accounts Name of company accounts tst tst

Set Employee User Relation for user in MSD axapta

 To Set Employee  for Relating to user in axapta you can follow below steps. 1. Click Area Page node: Administration -> Users. Form name: User Fig 1 2. Make sure the selection is changed in table User Information to: Alias Network domain User ID User name Company Enabled External test A bc.com test sk Singh test true false 3. Click the User relations button then go to general tab Form name: User relations Fig 2. 4. Switch to the General tab on the User relations form. Fig 3 5.  Change Employee from '' to ' 1005'. 6. Save the record in the User relations form. 7. Close the User relations form. 8. Close the User form.

Clear Usage data to improve performance in MSD axapta

Sometimes Ax forms and module becomes slow due to high usage data so that you can clear usage data to improve performance of Ax client. 1. Click the Microsoft Dynamics AX -> Tools -> Options... menu item. Fig-1 2. Click the OK button. 3. Click the Usage data button. Fig2 4. Click the Reset button. 5. Click Yes in the Reset Usage Data form. 6. Close the Usage data form.

Step by step to Export table template in axapta using Excel Template Wizard MSDAX

If  You need to import any table data through template then you need to export template then fill the data then you need to import that template. To Get template of particular table  you can follow steps below.. 1. Click Navigation Pane node: Administration -> Periodic -> Data export/import -> Excel spreadsheets -> Template Wizard. Form name: Microsoft Office Excel Template Wizard Fig 1. 2. Click the Next > button. 3. Switch to the Open workbook tab on the Microsoft Office Excel Template Wizard form. Fig2 4. Change File name from '' to ' E:\test\doc\filename.xls'. 5. Click the Next > button. 6. Switch to the Select tables tab on the Microsoft Office Excel Template Wizard form. Fig3 7. Click the > button. 8. Click the Next > button. 9. Switch to the Generate field list tab on the Microsoft Office Excel Template Wizard form. Fig4 10. Click the Next > button. 1

Cross Check Ledger balances from tables data for trial balance checking in MSD axapta

If you are facing any amount mismatch problem in trial balance report then you can cross check data with ledgertrans and ledgerbalancedimtrans table. You can check amount dimension wise. You can get hints from below query. select Sum(AmountMST) from _LedgerTrans group by AccountNum,transdate,Dimension[1],Dimension[2] ; select sum(DebitMst),Sum(CreditMst) from _LedgerBalancesDimTrans where LedgerBalancesDimTrans.AccountNum ==_LedgerTrans.AccountNum && _LedgerBalancesDimTrans.transdate==_LedgerTrans.transdate && _LedgerBalancesDimTrans.Dimension[1]==_LedgerTrans.Dimension[1] && _LedgerBalancesDimTrans.Dimension[2]==_LedgerTrans.Dimension[2]; amt= _LedgerBalancesDimTrans.DebitMST + _LedgerBalancesDimTrans.CreditMST

Tax regulation and tax calculation class,tables,methods for sales order in MSD axapta

Following Tax classes used to calculate tax for sales order in axapta 1. Taxsales 2. Tax 3. TaxRegulation. In Tax class there is  a method CalcTax on which tax calculate for particular tax code. First tax itemgroup takes from Sales Line then its take formula then formula evaluated by using evabuf method. tmptaxworkTrans is a temporary table which shows temporary tax calculation.If there is tax adjustment then you need to apply tax button on salestax form to get effects.  Corrected Tax or tax adjustment stored in field SourceRegulateAmountCur of Tmptaxworktrans and  Regular tax  field is  sourceTaxAmountCur. Before posting table is  tmptax and tmptaxworktrans,tmptaxregulation After posting Tax table is  TaxTrans,ledgerTrans,CustInvoiceJour.

Code to get total Tax amount from sales order in MSD axapta

To gett total Tax amount of sales order in axapta you can try below code in job . SalesTotals salesTotals; SalesTotals_Trans salesTotals1; SalesTable salesTable; SalesLine salesLine; TaxAmountCur Amount,amt1; Tax tax; ; salesTable = SalesTable::find("S0000343_052"); salesLine = SalesLine::find(salesTable.SalesId); salesTotals = SalesTotals::construct(salesTable); tax = Tax::construct(NoYes::No); Amount = salesTotals.totalTaxAmount(); info(Strfmt("The tax amount is %1",Amount ));

Code to Read Html File in MSD Axapta

Follow code is to Read from html file using Axapta x++. str page; str filename; commaIO myfile; int handle; WinInet _WinInet = new WinInet(); ; filename = "C:\\HTMLfl.txt"; myfile = new commaIO(filename,"w"); handle = _WinInet.internetOpenUrl('http://www.test.com'); if (handle) { page = _WinInet.internetReadFile(handle); myfile.write(page); } _WinInet.internetCloseHandle(handle);

Code to get Sales and purchase Quantity and amount date and item wise in MSD Axapta

To  get Sales and purchase Quantity and amount date wise in Axapta you can try following code in Fetch method of customized Report to get the same. Query q; QueryRun qr; QueryBuildDatasource qbds; QueryBuildRange qbr; InventTable inventtab; CustInvoiceTrans _custInvoiceTrans; vendInvoiceTrans _vendInvoiceTrans ; q = this.Query(); qbds = q.addDataSource(tablenum(InventTable)); qr = new QueryRun(q); while(qr.next()) { inventtable = qr.get(tableNum(InventTable)); select sum(Qty),sum(LineAmount) from _vendInvoiceTrans where _vendInvoiceTrans.ItemId==_ItemId &&_vendInvoiceTrans.InvoiceDate >= fromDate &&_vendInvoiceTrans.InvoiceDate <= ToDate; _PurchQty=_vendInvoiceTrans.Qty; _PurchAmount=_vendInvoiceTrans.LineAmount; select sum(Qty),sum(LineAmount) from _CustInvoiceTrans where _CustInvoiceTrans.ItemId==_ItemId &&_CustInvoiceTrans.InvoiceDate >= fromDate &&_CustInvoiceTrans.InvoiceDate <= ToD

Example of Fetch method of report using query build data source in MSD axapta

This is a code to get details of table data which is added to report data source. You can add following code in fetch method of report to check how to get value of data you can add range in data source and get the filtered records from report. Query q; QueryRun qr; QueryBuildDatasource qbds; QueryBuildRange qbr; ; q = this.Query(); qr = new QueryRun(q); QBDS = QR.query().dataSourceNo(1); while(qr.next()) { inventtable = qr.get(tableNum(InventTable)); info(inventtable.ItemGroupId); }

Example of doupdate in MSD axapta

To update records forcefully in table you can use doupdate method with tablename. Following example is helpful to understand this thing . InventTrans _inventTrans; ; ttsbegin; while select forupdate _inventTrans where _inventTrans.RecId == 5637152999 { _inventTrans.inventDimId = '123213'; _inventTrans.doUpdate(); } ttscommit;

Code Execute AIF Batch Job in MSD axapta

You can Execute AIF Batch Job in axapta just you need to paste following code to check for the same. AifInboundProcessingService _AifInboundProcessingService = new AifInboundProcessingService(); AifOutboundProcessingService _AifOutboundProcessingService = new AifOutboundProcessingService(); AIFGatewaySendService _AIFGatewaySendService = new AIFGatewaySendService(); AIFGatewayReceiveService _AIFGatewayReceiveService = new AIFGatewayReceiveService(); ; _AIFGatewayReceiveService.run(); _AifInboundProcessingService.run(); _AifOutboundProcessingService.run(); _AIFGatewaySendService.run();

Workflow Error in MSD axapta

Please comment on this error . I am running tutorial_workflowprocessor form. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.ComponentModel.Win32Exception: The handle is invalid at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation) at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize) at System.Drawing.Graphics.CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize) at Microsoft.Dynamics.Framework.UI.WinForms.Controls.Toast.get_BackgroundTransparentImage() at Microsoft.Dynamics.Framework.UI.WinForms.Controls.Toast.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean di