Posts

How to refresh list page and do not lost focus in grid?

I opened detail form in list page grid. I have done some changes in the detail form(say added the qty, changed the unit price..etc), while close() the form I am refreshing the list page grid (only the selected record. it increase the performance rather refresh all records in the grid)    FormDataSource   callerDataSource;    int                          position;   if (element.args().record())   {        callerDataSource = element.args().record().dataSource();          position               = callerDataSource.getPosition();        callerDataSource.reread();                callerDataS...

MultiSelectionHelper - example

Hi, Please refer the below 2 class for MultiSelectionHelper example 1) SmaSubscriptionBase 2) smaSubscriptionCreate Thanks, Vijaykarthik

Custom lookup for Dialog fields - easy way

Hi, SysTableLookup can be used in dialogs to create custom lookups. control.registerOverrideMethod can be used to register the methods to override by an object Here is the example which shows basic usage of both. We will create a dialog and get a lookup of account numbers on a control protected Object dialog() {     FormStringControl control;     ;     dialog = super();     dialogFeildAccountNum = dialog.addField(extendedTypeStr(AccountNum));     control = dialogFeildAccountNum.control();     control.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(DialogLookup, accountNumLookup ), this);         return dialog; } Here is the method: private void accountNumLookup(FormStringControl _control) {     SysTableLookup          sysTableLookup;  ...

Refresh Parent Form after updating data in child form

Hi, when you want to refresh the parent form after updating data in child form, void click() { FormRun   fr; MenuFunction  mf; Args    args = new Args(); ; //super(); mf = new MenuFunction(menuitemdisplaystr('SalesTable'),MenuItemType::Display); args.record(SalesLines); fr = mf.create(args); fr.run(); fr.wait(true); SalesLine_ds.reread(); SalesTable_ds.research(true); //true value is important } (or) if (this.parmArgs() &&     this.parmArgs().record() &&     this.parmArgs().record().dataSource()) {     formDataSource = this.parmArgs().record().dataSource();     formDataSource.reread();     formDataSource.research(true); }

Blank Page Issues – SSRS Reports

Hi, Refer the below link to resolve the blank page printing in SSRS reports of ax 2012 https://stoneridgesoftware.com/blank-page-issues-ssrs-reports/

Management Reporter 2012 Security Review with AX 2012

Hi, Please refer the below link to assign the permission in MR from ax 2012. https://blogs.msdn.microsoft.com/axinthefield/2015/02/02/management-reporter-2012-security-review-with-ax-2012/

Find Active Dimensions for a Legal Entity in Ax2012

Hi, Please use the below code to find the active dimension by legal entity. it will be useful when we do data upload. static void getActiveFinancialDimensions(Args _args) {     DimensionAttributeSetItem   dimAttrSetItem; // Contains the number of dimensions active for a account structure ledger     DimensionAttribute          dimAttr; // Contains the financial dimensions records     DimensionEnumeration        dimensionSetId; //Record id for table that contains active dimensions for current ledger         int dimAttrCount;         //Get the record Id (dimension set id) for current ledger to find active dimensions     dimensionSetId = DimensionCache::getDimensionAttributeSetForLedger();       //Find the count of active dimensions fo...

How to Rebuild DataMart in MR for Ax 2012

Hi, Please refer the below link to rebuild the Data mart in Management reporter (MR) for Ax 2012. http://www.daxfinanceblog.com/management-reporter/2015/1/25/missing-values-in-management-reporter-rebuild-the-ddm Thanks, Vijaykarthik

How to change Batch caption dialog field in run time.

Hi, Interesting article to change the batch caption during run time. please follow the below link  for more information http://alexvoy.blogspot.ae/2014/01/how-to-change-batch-caption-dialog.html Thanks, Vijaykarthik

x++ code to Generate cheque for vendor payment journal

Hi, X++ code to generate check (cheque) from Vendor payment journal (generate payments). Note: In the Method of payment field, select a method of payment that uses the Check export file format. //*********************************** /*To print check     1) PaymMode - must be filled in LedgerJournalTrans (in paymMode = export format to be check)     2) OffsetAccountType = Bank in LedgerJournalTrans     3) Generate Payment dialog, bank account = Offset Bank account in LedgerJournalTrans*/ //************************************* static void GenerateCheque_VendorPayment(Args _args) {     LedgerJournalTrans      LedgerJournalTrans = LedgerJournalTrans::findRecId(5637186584, true);     VendSumForPaym          vendSumForPaym;     boolean              ...

Excel import for AR/AP/Ledger journal lines

Hi, Please refer the below link to import the Customer/ Vendor/ Ledger journal lines into ax via Excel. https://community.dynamics.com/ax/b/thedynamicsblog/archive/2013/12/23/import-ledger-ap-and-ar-invoice-journal-lines Regards, Vijaykarthik

Extract/Create Dimension Master values

Hi, The below job helps to extract all the values for the specific dimension. //To extact all the values for a specific dimension (ex: Department) static void ExtractDimensionValues(Args _args) {     DimensionValueService   service         = new DimensionValueService();     DimensionContract       contract        = new DimensionContract();     DimensionValueContract  contractValue   = new DimensionValueContract();     List                    deptDimList;     ListEnumerator          listEnum;        Name                 ...

Auto deployment of DLL in client machine - Ax 2012

Hi, I found some interesting link to deploy the dll into client machine when you open ax. please read it. http://coffeestain-it.blogspot.ca/2015/05/dynamics-ax-sysfiledeployment-framework.html other link: http://daxmusings.codecrib.com/2013/07/auto-deploying-dlls-and-other-resources_31.html Note: 1) DLL deployment is required when you create business logic in Dot.net class library project and reference back in Ax. (via reference node) (ex: AxFTP) 2) When you consume the business logic via web service you no need to deploy the dll in client  (It means, you created a class library project in dot.net and added the service reference to consume the external webservice. when you deploy the dot.net project automatically dll file is copied to ax server VSassembly folder. It is enough. Now u can able to create object in ax class) (ex:AxOasisFinIntegration)

SSRS – No connection could be made because the target machince actively refuesd it..

Hi, Please refer the below link to fix this issue, https://guyterry.wordpress.com/2013/10/02/ssrs-no-connection-could-be-made/ I have faced this issue, because multiple report services instance(one for dev, one for test..etc) has running on one report server. The report services are not pointing to the correct Ax instance. So I referred this link and changed my .axc (copied the ax config file to this location) to point the right Ax instance. My issue resolved and can able to render the report in ax. Thanks, Vijaykarthik

Convert Word to PDF in ax 2012

Hi, please use the below job to covert your word file into pdf file. static void convertWordToPDF(Args _args) {     COM             wordApplication;     COM             wordDocuments;     COM             wordDocument;     //COM             wordRange;         Filename        docFileName = @"C:\AX Documents\Document Handling\GCO-000025.doc";     Filename        pdfFileName;         Filename        filepath;     Filename        fileName;   ...

Document handling - ax 2012

Hi, please refer the below video to create word document with bookmark and dynamically pass the values to the bookmark from dynamics ax. (used the class -> Create a Microsoft Word document by using COM) https://www.youtube.com/watch?v=NVSxc2jg2iY For, programmatically handle the document handling https://www.youtube.com/watch?v=NVSxc2jg2iY https://community.dynamics.com/ax/b/axaptavsme/archive/2013/03/07/document-handling-via-x To show/hide the bookmark in word document template http://www.extendoffice.com/documents/word/848-word-show-hide-bookmarks.html Cool stuff. Thanks, Vijaykarthik

Ax 2012 R3 demo data & Test data Transfer Tool download

Hi, Interesting article to deploy the demo data into ax 2012 R3. refer the link below, http://dynamicsaxsharma.blogspot.com.au/2015/07/ax-2012-r3-demo-data-test-data-transfer.html Thanks, Vijaykarthik

EP (Enterprise portal) not working in Ax 2012

Image
Hi, We have installed the EP in our UAT server and done the configuration. It has created a web site in Ax (system administration -> setup -> Enterprise portal -> websites). when we click the url, the  EP page is not loading, and it thrown the below error. Exception: Wrong type of element at call of conPoke (C)Classes\webSession\webApplication - line 15 (C)Classes\WebSession\init - line 30 To resolve the above error, we done the below (deleted the AUC files /client catch files). steps are, 1.        Stop AOS 2.        Use BC account login SharePoint server which EP cannot work. 3.        Go to BC user’s user profile : %USERPROFILE%\APPDATA\LOCAL 4.        Delete all .auc files. 5.        Start AOS. 6.        Try EP works or not. Note: Please enable the hidden items in s...

Top 10 issues discovered from Dynamics AX Code Review

Hi, Please refer the below link to discovered the top 10 issue in the Ax coding. must read. http://blogs.msdn.com/b/axinthefield/archive/2014/02/18/top-10-issues-discovered-in-the-dynamics-ax-code-review.aspx Thanks, Vijaykarthik

Import customer/vendor/Worker using Data import export framework in ax 2012 r3

Hi, To import the master data (like customer, vendor, worker..etc) by using Data import and export framework (DIXF) in Ax 2012 R3. Refer the below link for step by step explanation, http://shafeaa.blogspot.ae/2015/07/import-workers-using-data-import.html Thanks, Vijaykarthik