Skip to main content

Posts

Solved Error during Inventory Closing and Recalculation in Ax 2012

Getting following Error during Inventory Closing and Recalculation in Ax 2012. Error Details: "You can't have unallocated cost on a planning formula" Solution : This error may come many ways. First check the item in production type is formula or not, if not, change production type to formula. Then you can debug following method in class InventCostItemDim  \Classes\InventCostItemDim.addFormulaKeyAdjustment() To get any error due to rounding you can check ledgervouchertransobject class in checkrounding method. Then you can correct rounding issue. If still error exist then find the recid by debugging on error editing message and find that record in inventtrans table. If in inventtrans table valueopen field if its yes then select no this option you can use only if there is no other solution you found.

Get unit conversion value of item in Ax 2012

To Get unit conversion value of item in Ax 2012 you can use below code. UnitOfMeasureConverter_Product is a class which has different method to give you converted value. Here example is showing to get conversion value from liter to kilo gram. UnitOfMeasureConverter_Product unitConverter = UnitOfMeasureConverter_Product::construct(); unitConverter.parmProduct(InventTable::find("TestIte",true).Product); unitConverter.parmFromUnitOfMeasure(UnitOfMeasure::unitOfMeasureIdBySymbol("ltr")); unitConverter.parmToUnitOfMeasure(UnitOfMeasure::unitOfMeasureIdBySymbol("kg")); unitConverter.parmRoundAbsoluteValue(NoYes::Yes); unitConverter.parmApplyRounding(NoYes::Yes); info(strFmt("%1",unitConverter.convertValue(1)));

Run Dynamics Ax as different user on single machine

If you want to Run Dynamics Ax with different user on single machine then you need not to login as remote with different user you can run Ax with same login by following trick. Just press shift and then right click on dynamics Ax Icon then following option will show for login as different user. This will work only for original Ax Shortcut not Ax configuration file. If you want to do this trick with configuration file then you need to do below. First You need to create an AX32.exe shortcut that takes the config file as a parameter using properties option . Put below. C:\Program Files\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe" -regconfig=C:\ConfigName.axc

Execute SSRS Report by code in Ax 2012

I want to share to Execute SSRS Report by code in Ax 2012. You can use below code to run report manually . You can try this code if you are not able to view your report due to some security issue. You can use controller class code to debug your report the get the cause. //version ax 2012 Code SrsReportRunController SRScontroller; SRScontroller= new SrsReportRunController(); SRScontroller.parmReportName(‘TestReport.ReportDesign1′); SRScontroller.runReport();

Create lookup Code on dimension field in Ax 2012

This code is to create lookup on dimension field like Business unit,department,division etc.You can add this code in your class ,form etc.There could be little bit  change in coding on  form for lookup. // FormStringControl control = dialog.formRun().controlCallingMethod(); SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(DimensionAttributeValue), control); Query query1 = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange queryBuildRange; DimensionAttribute dimAttr; ; dimAttr = DimensionAttribute::findByName("Department"); query1.addDataSource(tablenum(DimensionAttributeValue)).addRange(fieldNum(DimensionAttributeValue,DimensionAttribute)).value(queryValue(dimAttr.RecId)); sysTableLookup.addLookupMethod(tableMethodStr(DimensionAttributeValue, getname)); sysTableLookup.addLookupMethod(tableMethodStr(DimensionAttributeValue, getValue)); //this code is to add

Bank Account Reconciliation Error in Ax 2012

Getting below error on Bank Account Reconciliation in Ax 2012. Solution: The error given above generally comes when a manual entry is made in the Bank Reconciliation form. After checking data it was found that a manual entry has been done in one of the transactions for an amount xxxx. This requires ledger account in the Bank Transaction type.To correct this issue A journal voucher is required to be posted for the adjustment transaction of particular amount which is found as manual entry.

System admin cannot add or edit roles privileges duties Ax 2012

Problem: Issue is user sys admin not able add or edit and roles privileges duties etc its allowing from AOT but not from AX client. Solution: If you have Sys Admin and Sys User you should be able to make changes via System administration > Setup > Security but if you are still not able to do that then there may be something setting issue. After checking all setting at Ax found that Version control was enabled in the system so its not allowing to change roles privileges and duties  when Version control disabled then its working fine. Due to Version control enabled its being locked for change and its for security reason.

Table Replication Error on Synchronization in Ax 2012

Getting this error on data dictionary synchronization.. Error Synchronise database Cannot execute a data definition language command on  (). The SQL database has issued an error. Info Synchronise database SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot alter column 'VOUCHER' because it is 'REPLICATED'. Info Synchronise database SQL statement: ALTER TABLE "DBO".BANKCHEQUETABLE ALTER COLUMN VOUCHER nvarchar(30) NOT NULL Error Synchronise database Cannot execute a data definition language command on  (). The SQL database has issued an error. Info Synchronise database SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot alter column 'VOUCHER' because it is 'REPLICATED'. Info Synchronise database SQL statement: ALTER TABLE "DBO".BANKDEPOSIT ALTER COLUMN VOUCHER nvarchar(30) NOT NULL Error Synchronise database Cannot execute a data definition languag

Purchase order Budget validation Error in Ax 2012

Problem: Purchase order Budget validation Error in Ax 2012 coming during purchase invoice . This PO is previous year purchase order on which period is stopped/closed. "The accounting date for the invoice must be in the same fiscal year as the related purchased order. Run the purchase order year-end process or change the date to the current fiscal year" Solution: Check the option in below menu. Go to budgeting -Setup->Budget control->Budget control configuration and make changes in projectsourcedoucuemntlineitemHelper class of projTranstype method by comparing class at Hotfix Ax 2012 R2 KB2921204

Workflow stopped Error after submission for approval in Ax 2012

Problem . I faced this error Workflow stopped Error after submission for approval in Ax 2012. The items are Purchased, Received or Registered. Quantity ordered cannot be reduced because there are not enough open stock transactions with the ordered status. Observation My observation is as below When I am create new Purchase order and purchase order is in invoiced status but 2 qty is in cancel mode then purchase order getting approved but for old order its give above error. After investigation on google and other sites I did not get anything so finally I did approved workflow from back end activity. I hope some people who is smart they will give answer to me on this query. After some days I get same error again then I assigned admin rights to approval user then its getting approved.

IDMF Posting error on starting for Ax 2012 windows 8 r2

This topic is related to Intelligent Data Management Framework for Microsoft Dynamics. If you have installed IDMF then trying to start IDMF then facing error like must complete post installation task then you can resolve error by using following menu path. Click Start > All Programs > Intelligent Data Management Framework > Post-installation tasks If you are using windows 8 r2 then you can type post installation on startup like this screen. After running this you will see command prompt which will show instruction step by step like xpo import,synchronization of meta database .You may face rights error during that so you need to resolve in SQL management studio by give permission of database to user.

Find Ledger Account Id by Ledger dimension in Ax 2012

To Find Ledger Account Id by Ledger dimension in Ax 2012 you can get hint from below code. findByLedgerDimension is a method defined in Mainaccount table where you can pass ledgerdimension value . MainAccountId is field name which is created in MainAccount Table. MainAccount Table is main master table for Ledgers. info(strFmt("%1",MainAccount::findByLedgerDimension(3427167077).MainAccountId));