Posts

Showing posts with the label Error

User 'UserID' is not authorized to select a record in table 'CustDefaultLocation'. Request denied. Cannot select a record in Customer default locations (CustDefaultLocation). Access Denied: You do not have sufficient authorization to modify data in database.

Image
Hi AX Technical, Today, in this post we will talk about an SSRS Report Error and its solution. Please have a look at the below error: If you are getting this below error that means you need to enable remote errors first. Please click on this link to check the solution. Once you enable the remote errors you can check for below error solution: Error : User 'UserID' is not authorized to select a record in table 'CustDefaultLocation'. Request denied. Cannot select a record in Customer default locations (CustDefaultLocation). Access Denied: You do not have sufficient authorization to modify data in database. (S)\Classes\xInfo\add (S)\Classes\Info\add - line 94 (S)\Data Dictionary\Tables\CustDefaultLocation\Methods\exists - line 6 (S)\Classes\LogisticsLocationDefault\defaultExists - line 18 (S)\Classes\LogisticsLocationDefault\findSimpleDefault - line 19 (S)\Data Dictionary\Tables\SalesTable\Methods\initFromCustTableMandatoryFields - l...

Illegal data conversion from original field ProdParameters.PKA_BOMQtyEdit to ProdParameters.PKA_DisableNewDeletePickingList: unable to convert data types to anything but character field type (14 to 49)

Image
Hi Technical, Today, in this post we will talk about a very interesting topic about illegal data conversion from original field to newly created field. Here, we need to understand this error occur while DB synchronization. Error : Illegal data conversion from original field ProdParameters.PKA_BOMQtyEdit to ProdParameters.PKA_DisableNewDeletePickingList: unable to convert data types to anything but character field type (14 to 49) Note : PKA_BOMQtyEdit  and PKA_DisableNewDeletePickingList are ProdParameters table fields. Solution : Note : Please perform below action if you are DBA or having knowledge on SQL Queries in AX. Check the fields id in AOT and compare it with SQLDictionary table in SQL with the following query: --To Check: select * from SQLDICTIONARY where TABLEID in (select TABLEID from SQLDICTIONARY where name = 'ProdParameters') and NAME = 'PKA_BOMQtyEdit' select * from SQLDICTIONARY where TABLEID in (select TABLEID from SQLDICTION...

SSRS Error: There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs

Image
Hi Folks, Today, in this post we are going to share a solution for below error. We got this error while running a SSRS Report from AX client. Error: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs. The InnerException message was 'Element 'http://tempuri.org/:queryBuilderArgs' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/XppClasses:SrsReportProviderQueryBuilderArgs'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver if you are using DataContractSerializer or add the type corresponding to 'SrsReportProviderQueryBuilderArgs' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to the serializer.'. Please see InnerException for more details. Soluti...

AX 2012: The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.

Image
Hi Readers, Today, in this post we are going to share a solution for below error. Error : The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. Solution: 1) Login to AX and end user's sessions. 2) Logout from AX. 3) Restart AX AOS services. 4) Restart SSRS Services. 5) Login to AX again and navigate to System administration/Area page/Setup/Business intelligence/Reporting Services/Report servers and click on validate settings. Please see below screenshot for your reference. 6) You should get success message after validating the settings. 7) Now, try to run a report and wait for sometime as it will take sometime to run the SSRS reports first time. 8) Enjoy, error is resolved. Comment below if you found this article helpful... Author : Chirag Gupta Microsoft Dynamics 365 AX Technical Consultant at IBM Bangalore Date : 3-Jan-2020 Happy Learning !!

AX 2012 - Update must be performed inside a transaction

Image
Hi Readers, Many times you might have seen below error while you were updating or inserting data using X++. Error: Update must be performed inside a transaction Solution: The solution for the above error is you must keep your updating or inserting code into ttsBegin and ttsCommit. Syntax: ttsBegin; // Your_Code ttsCommit; Example: Copy code from below: // Code written by Chirag Gupta static void updateRebateData(Args _args) {     PdsRebateTable          pdsRebateTable;     PdsRebateAgreement      pdsRebateAgreement;     PdsRebateAgreementLine  pdsRebateAgreementLine;     int                     counter = 0;         while select forUpdate pdsRebateAgreementLine         join pdsRebateAgreement             where pdsRebateAgreementLine.RebateAgr...

AX 2012 - Error in CIL Generation: "CIL generation: Object reference not set to an instance of an object."

Image
Hi Readers, Today, in this post we will share a very important solution about the following error: Error: Error in CIL Generation : "CIL generation: Object reference not set to an instance of an object." Err:351 We got the above error while doing Full CIL. You may get this error after a incremental or Full CIL. Solution : 1. Go to AX services and stop the AOS. 2. Go to C:\Program Files\Microsoft Dynamics AX\60\Server\Microsoft_Dynamics_AX\bin and rename XppIL folder as XppIL_Old. After successful CIL we will delete XppIL_Old folder and a new XppIL folder will be automatically created in this folder by AX. 3. Start the AOS services. 4. Login to AX. 5. Go to development environment by pressing CTRL + D and generate Full CIL. 6. If you are still getting the errors after Full CIL please check the objects individually which are throwing the errors and resolve them. 7. Once all the errors are resolved compile them. Please click here to know...

AX 2012 - Error during CIL: System.OperationCanceledException: AIF service group not activated.

Image
Hi Readers, Today, in this post we are going to share a solution for the below error. We got the below error while doing Full CIL. Error : System.OperationCanceledException: AIF service group not activated.  Service group: FinancialDimensionServices.  Error: Type 'Dynamics.Ax.Application.BudgetDimensionValidationStatusContract' cannot inherit from a type that is not marked with DataContractAttribute or SerializableAttribute.  Consider marking the base type 'Dynamics.Ax.Application.DimensionValidationStatusProcessor' with DataContractAttribute or SerializableAttribute, or removing them from the derived type. ---> System.Runtime.Serialization.InvalidDataContractException: Type 'Dynamics.Ax.Application.BudgetDimensionValidationStatusContract' cannot inherit from a type that is not marked with DataContractAttribute or SerializableAttribute.  Consider marking the base type 'Dynamics.Ax.Application.DimensionValidationStatusProcessor' with DataContrac...

[Error] - Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally.

Hi Folks, Today, in this article we will talk about below error which generally cause when database is in use and you want to perform an operation on DB like DB restoration. Error : Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. Solution : 1. Login to your SQL Server Management Studio (SSMS) using run as administrator. 2. Select the DB on which you want to perform the operation. 3. Click on 'New Query' button or press CTRL + N, a new window will open. 4. Copy the below script and run it. use master go alter database Your_DB_Name set single_user with rollback immediate go alter database Your_DB_Name set multi_user go 5. Now, try to perform the operation again. You should be able to perform it. Comment below if this article helped you... Author : Chirag Gupta Microsoft Dynamics 365 AX Technical Consultant at...

[Solved] : AX 2012 - No connection could be made because the target machine actively refused it 192.168.10.249:8201

Image
Hi Readers, Today, all users from my working location faced below issue when they were running SSRS Report on AX 2012 R2/R3 version. Error : No connection could be made because the target machine actively refused it 192.168.10.249:8201 Solution : Step 1: End all users session from AX by logging out online users from System Administrator. Step 2: Close your AX and restart AX services . Step 3: Restart SQL Server Reporting Services ( SSRS ). Now, you can run the reports successfully. Author : Chirag Gupta Microsoft Dynamics 365 AX Technical Consultant at IBM Bangalore Date : 9-Sep-2019 Happy Learning !!

AX 2012 [Error] : Violation of PRIMARY KEY constraint 'PK_ModelElementData_ElementHandle'. Cannot insert duplicate key in object 'dbo.ModelElementData'.

Hi Developers, Today, we will talk about below error in AX 2012 R2/R3 or D365 FO. When we upgrade or apply an hot-fix into AX environment, we might face some challenges, suppose you are installing hot-fix in your environment and face an error, open your log file and check for error in the end of the file, one is below: AxUtil call returned errors: Violation of PRIMARY KEY constraint 'PK_ModelElementData_ElementHandle'. Cannot insert duplicate key in object 'dbo.ModelElementData'. The duplicate key value is (822606, 1). The statement has been terminated. Error updating model database: Microsoft.Dynamics.Setup.AxSetupException: AxUtil call returned errors:Violation of PRIMARY KEY constraint 'PK_ModelElementData_ElementHandle'. Cannot insert duplicate key in object 'dbo.ModelElementData'. The duplicate key value is (822606, 1). The statement has been terminated.    at Microsoft.Dynamics.Setup.Misc.ValidateAxUtilStatus(AxUtilContext context)    a...

[Solved] : Error: String or binary data would be truncated. Cannot execute a data definition language command on Vendor (VendLedgerReconciliationTmp)

Image
Error : Cannot execute a data definition language command on Vendor (VendLedgerReconciliationTmp). Date: . The SQL database has issued an error. SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]String or binary data would be truncated. SQL statement: INSERT INTO tempdb."DBO".t10799_95B4A012AC0F4D298A6CA7C554A0C4B6 (ACCOUNTINGDATE,VOUCHER,VENDAMOUNTMST,POSTINGPROFILE,ARRIVAL,APPROVED,VENDORACCOUNTID,VENDGROUP,VENDORNAME,RECVERSION,PARTITION) SELECT T1.TRANSDATE,T1.VOUCHER,T1.AMOUNTMST,T1.POSTINGPROFILE,T1.ARRIVAL,T1.APPROVED,T2.ACCOUNTNUM,T2.VENDGROUP,T3.NAME,1,5637144576 FROM VENDTRANS T1 CROSS JOIN VENDTABLE T2 CROSS JOIN DIRPARTYTABLE T3 WHERE (((T1.PARTITION=5637144576) AND (T1.DATAAREAID=N'rsa')) AND ((((((T1.TRANSDATE>={ts '2019-07-22 00:00:00.000'}) AND (T1.TRANSDATE<={ts '2019-07-22 00:00:00.000'})) AND (T1.VOUCHER>='')) AND (T1.VOUCHER<=N'ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°ď˝°')) AND (T1.POSTINGPROFIL...

Data is not showing on SSRS Report in AX 2012

Image
Hi Readers, Today, in this post we will share a solution for SSRS report issue. You might have seen when you run the SSRS report, it runs successfully but data will not display on the report. We have a solution for this... Issue:  Data is not showing on SSRS Report in AX 2012 Resolution: First, we need to understand how SSRS Report works. 1) SSRS Report fetches the data from AX. 2) For testing purpose, put a “test” in report layout and deploy it. 3) If it’s deploy successfully run the report and check “test” is showing in the report or not. 4) If “test” is showing on the report then the issue for not printing the data on report is; SSRS Report is not configured correctly with AX. How to do it? 1) Click on start button and open Microsoft Dynamics AX Configuration Utility. 2) A dialog box will open like below: 3) In the configuration dropdown choose the right AX configuration file. 4) Restart the AOS services. 5) Restart the SSRS report service...

Error: There was no endpoint listening at net.tcp://your_server_name:8201/Dynamics AX/Services…

Image
Hi Readers, Today, in this post we will share a very important solution for the below error. You may get this error at the time of report deployment in ax 2012 or may be when you are running a SSRS report. Error:  There was no endpoint listening at net.tcp:/your_server_name:8201/Dynamics AX/Services… "A call to the Microsoft Dynamics AX SRSFrameworkService service failed. There was no endpoint listening at net.tcp://############/DynamicsAx/Services/BIServices that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details." Solution: Method 1: 1) Go to System administration > Setup > Services & Application Integration Framework > Inbound ports. 2) Select BIServices port, activate same.  Note:  When you activate the same, you might get some more errors, please see the screen shot below: 3) Go to AOT >> Service Groups >...