Posts

Showing posts from 2015

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                 runDialog;     LedgerJournalCheckPostResults       postingResults_Client;     LedgerPostingMessage                logTxt;     ;     vendSumForPaym = CustVendSumForPaym::newLedgerJournalTrans(LedgerJournalTrans);     runDialog

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                    dimensionName;     str                         value;     Description             description;     ;         //To create new values in the specific dimension     //contractValue.parmDimensionAttribute('Departments');     //contractValue.parmValue('HR')     //contractValue.parmDescription('Human Resources');     //service.createDimensionValue(contractValue);     //To get the values for the specific dimension     contract.p

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;     Filename        fileExt;     ;         wordApplication = new COM("word.application");     wordDocuments = wordApplication.Documents();     wordDocument = wordDocuments.Open(docFileName);     [filepath, filename, fileExt] = fileNameSplit(docFileName);         pdfFileName =  filePath + filename + '.pdf';             wordDocument.ExportAsFixedFormat(pdfFileName, 17);         wordDocument.close();     wordApplication.quit();     //WinAPI::deleteFile(pdfFileName);     info('done'); } Tha

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 show/hide group of  view tab in the browser if appData is not visible. Now my EP is started working when I pressed the URL from web sites. Happy Daxing :) Thanks, Vijaykarthik

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

Excel add-in upload - General journal - Ax 2012 R3

Hi, The below link is explain the use of excel add-in to import the general journal header and lines. http://www.daxfinanceblog.com/dynamics-ax/2015/1/11/upload-a-general-journal-from-excel-in-dynamics-ax2012-r3 I followed and imported the same. It is using the standard web service (which is coming in out of box). No customization/job is required. Note: Please check the Data source for General ledger is available or not. if not you can create it (after registration of LedgerGeneralJournalService) "Document Data sources" is available in Org.admin -> setup -> Document management. Happy Importing. Thanks, Vijaykarthik

Shrink DataBase log file - Sql 2012

Hi, I had situation, when my log file size is increased and there is no space in my drive. so I could not able to login to Ax. I used the shrink data base file option to reduced the log file size. For that, I have done below steps, 1) stopped my AOS service 2) Open SQL 2012 management studio 3) To set the Recovery model =  "SIMPLE" for your DB. (my case AxDevDB) (Choose Your DB, right click and go to properties and then go to Option tab to see the recovery model) 4) Right click the DB and choose SHRINK -> File and choose the AXDevDB_log file and press ok. (it will reduce 99% of the log file size). 5) To set back the Recovery model = "FULL" for your DB. 6) Start the AOS Service. To run the SQL Script, use below, USE AxDevDB; GO -- Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE AxDevDB SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (AxDevDB_Log, 1); GO -- Reset the database recovery

Import Procurement Hierarchy / Categories with out code in ax 2012

Hi, To build the procurement category in ax 2012, we are going to use the " EcoResCategoryImportService ". This service is available in the standard ax box. In this article, interest thing is how to build the XML file from EXCEL. I love that. (It is easy to build the xml file, if we know this way) Please refer the link below for the detailed document, http://www.junctionsolutions.com/dynamicsax/loading-a-merchandising-hierarchy-with-no-programming/ Create XML from Excel. https://www.youtube.com/watch?v=9h7TW--M8BU Note: Before import, you must enable the " Execute business operations in CIL" in this path, File > Tools > Options > Development > General > Execute business operations in CIL Thanks, Vijaykarthik

Copy favorites From one user to another user - Ax 2012

Hi, The below job is used to copy the favorites from one user to another user. static void CopyFavoritesJob(Args _args) { SysPersonalization FromSysPersonalization; SysPersonalization ToSysPersonalization; UserId FromUserId= 'user01' ; UserId ToUserId= 'user03' ; ; ttsbegin ; // step 1 - delete current favorites menu from user while select forupdate ToSysPersonalization where ToSysPersonalization.ElementType==UtilElementType::UserMenu && ToSysPersonalization.UserId==ToUserId { ToSysPersonalization.doDelete(); } // step 2 - duplicate from user01 while select FromSysPersonalization where FromSysPersonalization.UserId==FromUserId && FromSysPersonalization.ElementType==UtilElementType::UserMenu { ToSysPersonalization.data(FromSysPersonalization); ToSysPersonalization.UserId=ToUserId; ToSysPersonalization.doInsert(); } ttscommit

Windows Server 2012: Deactivating UAC - SSRS

Hello, Error when validate settings in Report servers by any admin account which is not account used to install the AX reporting services extensions. Scenario: In Microsoft Dynamics AX 2012 R2, if i login as an user with admin rights in both AX and SQL reporting services and in AX, under System administration, Setup, Business intelligence, Reporting Services, Report servers after i click "Validate settings", i receive the following error. "Make sure that SQL Server Reporting Services is configured correctly. Verify the Web Service URL and Report Manager URL configuration in the SQL Reporting Services Configuration Manager." If i login as a user that was used to install the reporting services extensions and deployed the reports and ran the "Validate settings", the settings will be validated as correct. In reporting services report manager site, i have already granted the AX-Admins AD group as System Administrator under site settings, Home folder s

Install multiple instances of Reporting Services on the same computer - Ax 2012

Hi, Please refer the below link to install and configure multiple instance of SSRS in same box https://technet.microsoft.com/en-us/library/hh389760.aspx Thanks, Vijaykarthik

SSRS Report AX 2012 - The operation has timed out error message when you run a report in Microsoft Dynamics AX

Hi, Please visit the below link for the above post http://sinedax.blogspot.ae/2012/11/ssrs-report-ax-2012-operation-has-timed.html http://blogs.msdn.com/b/dynamicsaxbi/archive/2013/02/14/how-to-addressing-ssrs-session-timeouts.aspx https://technet.microsoft.com/en-us/library/jj969577.aspx Thanks, Vijaykarthik

To Changing Decimal Places for Quantity In Microsoft AX

Hi, My client have a requirement to change the qty in to 4 decimal place. For this, 1) Go to Data dictionary -> Extended data types -> select Qty (EDT) 2) Open the properties and change the Number of Decimals to 4 ( by default Auto - 2 decimal) 3) Now Go to Unit master in Ax (Organization administration -> setup -> Units -> units) 4) Select the Units and change the Decimal Precision to 4 Note: Please don't change the RealBase EDT. because it has referenced for other than qty EDT. reference : http://www.axsolution.com/?p=332

Covert/Format the Date into dd/MM/yyyy in SSRS - ax 2012

Hi, In SSRS Change the property/Expression of the column like below =Format((Fields!DoB.Value), "dd/MM/yyyy") I found the below link useful which describes more on Format function in SSRS - (A good read) http://thavash.wordpress.com/2007/04/10/working-with-dates-in-reporting-services/

Error in SSRS in ax 2012 :For more information about this error navigate to the report server on the local server machine, or enable remote errors

Please restart the "Ax services" and "SSRS reporting" services it can be resolve your problem 

How to check a particular dimension is filled or not?

Hi, Use the below code to check whether a dimension is filled or not in the default dimension.       public Boolean checkDeptartmentDimension() {   DimensionAttributeValueSetItem dimAttrValueSetItem; DimensionAttribute dimAttr; DimensionAttributeValue dimAttrValue; Common dimensionValueEntity;   dimAttr = DimensionAttribute::findByLocalizedName( 'Department' ); select dimAttrValueSetItem where dimAttrValueSetItem.DimensionAttributeValueSet == this.DefaultDimension join dimAttrValue where dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue && dimAttrValue.DimensionAttribute == dimAttr.RecId;   if (!dimAttrValueSetItem)      return checkFailed( strFmt ( "Department dimension must be filled in." )); return true ; }  

How to change Date fromat (dd/MM/yyyy) in Regional Settings for all users on a computer

Hi, Please read the below link to change the date format (dd/MM/yyyy) for all users connected to the machine/computer. http://blogs.technet.com/b/askperf/archive/2012/08/16/how-to-change-regional-settings-for-all-users-on-a-computer.aspx Note: We have to setup the group policy.

Import Purchase Trade agreements in Ax 2012 using CSV file

Hi, The below job is used to import the purchase trade agreement journal lines. //To create the purchase trade agreement lines. //Forthis, just create the Journal header first and import the lines by using this job   static void CreatePurchTradeAgreementLines(Args _args) { CommaIO     csvFile; container    readCon; counter     icount,inserted; Dialog      dialog; DialogField dfFileName; FileName    fileName; itemId      itemId; AmountCur   amount; str          strFromdate,strTodate,type; TransDate   fromDate, toDate;     PurchUnit   purchUnitId; PriceDiscJournalNum journalNum; TableGroupAll TableGroupAll;     AxPriceDiscAdmTrans axPriceDiscAdmTrans; PriceDiscAdmTrans   priceDiscAdmTrans; InventDim           inventDim;

CIL generation: Index was out of range. Must be non-negative and less than the size of the collection

Problem : Recently, I installed one of the model files from an ISV and everything went fine in DEV environment. I replicated the same process in UAT environment for installation and installed the model files. After which I ran the full application compile, database synchronization and then full CIL. The full CIL failed because of following error: CIL generation: Index was out of range. Must be non-negative and less than the size of the collection Solution : I could fix this problem by following steps: Since there were no compilation errors in full application compile, I was sure that there are no errors in the application. The system was not able to pick some assemblies so I compiled the Tables manually and then classes. After which, I put the application on full CIL again and it worked fine.     when you open the CIL log file the below error message shown, Note: CIL log file path is " C:\Program Files\Microsoft Dynamics AX\60\Server\YOUR_INSTANCE\bin\XppIL\Dynamic