Posts
Showing posts from 2020
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.
- Get link
- X
- Other Apps
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...
For more information about this error navigate to the report server on the local server machine, or enable remote errors in AX 2012
- Get link
- X
- Other Apps
Hi AX Technical, Today, in this post we will share a very helpful trick to fight with below kind of error. Error : For more information about this error navigate to the report server on the local server machine, or enable remote errors. Here, we see there is no such description of the error. So first we need to enable remote errors in AX 2012. Solution : Please follow the steps below. Method 1: Open SQL Server Management Studio (SSMS) and create a query. Copy, paste the below query to check and update the value. -- SQL Query written by Chirag Gupta -- To Check the value USE ReportServer select * from ConfigurationInfo where name = 'EnableRemoteErrors' -- To Update the value if the value is false USE ReportServer GO UPDATE ConfigurationInfo SET Value = 'True' WHERE Name = 'EnableRemoteErrors' Method 2: Follow below procedure to enable remote error in SSMS for SSRS 1) Open SQL Server Management Studio and log in with ...
Fetch product number and storage dimension group in AX 2012 using SQL Query
- Get link
- X
- Other Apps
Hi Readers, Today, in this post we will share a SQL Query to fetch product number and storage dimension group in AX 2012. Requirement : We need to fetch product number and storage dimension group in AX 2012. Solution : Open SQL Server Management Studio (SSMS) and create a new query. Copy, paste the below query and execute it. -- SQL Query written by Chirag Gupta select EcoResProduct.DISPLAYPRODUCTNUMBER as 'Product Number', EcoResStorageDimensionGroup.NAME as 'Storage Dimension Group' from EcoResStorageDimensionGroup join EcoResStorageDimensionGroupProduct on EcoResStorageDimensionGroupProduct.STORAGEDIMENSIONGROUP = EcoResStorageDimensionGroup.RECID join EcoResProduct on EcoResStorageDimensionGroupProduct.PRODUCT = EcoResProduct.RECID where EcoResStorageDimensionGroup.NAME = 'SWL' We hope this solution helped you to fetch product number and storage dimension group in AX 2012 using SQL Query. Please comment yo...
Error executing code: InventClosing (table) has no valid runable code in method 'unresolvedClosingExist' in AX 2012
- Get link
- X
- Other Apps
Hi Folks, Today, in this article we are going to share a very helpful tips to resolve the below kind of error in AX 2012. Error : Error executing code: InventClosing (table) has no valid runable code in method 'unresolvedClosingExist'. Stack trace (S)\Data Dictionary\Tables\InventClosing\Methods\unresolvedClosingExist (S)\Classes\ProdUpdStatusDecrease\validate - line 17 (S)\Classes\ProdUpdStatusDecrease_StartUp\validate - line 3 (S)\Classes\ProdUpdStatusDecrease\run - line 13 (S)\Classes\ProdTableType\runStatusDecrease - line 8 (S)\Classes\ProdStatusType\runStatusDecrease - line 27 (S)\Classes\ProdMultiStatusDecrease\run - line 44 (S)\Classes\RunBaseMultiParm\runOnServerInternal - line 31 (C)\Classes\RunBaseMultiParm\runOnServer - line 8 (C)\Classes\ProdMultiStatusDecrease\main - line 39 (C)\Classes\FormFunctionButtonControl\Clicked Cause : This problem may be caused by the following issues: A method that is being called has syntax errors in the code....
System.OperationCanceledException: AIF service group not activated in AX 2012
- Get link
- X
- Other Apps
Hi AX Technical, Today, in this post we are going to share a solution for below error: Error : System.OperationCanceledException: AIF service group not activated. Service group: AccountsReceivableServices. Error: There is already a listener on IP endpoint 0.0.0.0:8201. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. ---> System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:8201. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted ...
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)
- Get link
- X
- Other Apps
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...
Multiple table fields custom lookup in AX 2012
- Get link
- X
- Other Apps
Hi Friends, Today, in this post we are going to share how you can add multiple tables fields custom lookup in AX 2012. Let's take a scenario to understand the requirement first... We need to make custom lookup for Product Number from EcoResProduct table and Item Number from Invent Table. For this type of requirement first create a query by joining these two tables and then add query and fields in view. Steps to follow: 1. Create a new query and drag and drop InventTable from AOT in it. 2. Set the fields property Dynamic = No and add ItemId in fields. 3. In InventTable data source drag and drop EcoResProduct table from AOT. 4. Set the fields property Dynamic = No and add DisplayProductNumber in it. 5. Set the Fetch mode = 1:1 and Relations = Yes for EcoResProduct data source property. 6. Query is ready to use to add in View. Let's create a view. 7. Create a view and add your query in it. 8. Add fields which you want to show in the view. 9. Write cu...
crossCompany and changeCompany in AX 2012
- Get link
- X
- Other Apps
Hi Folks, Today, in this article we will understand the use of crossCompany and changeCompany in AX 2012. Let's start... crossCompany : You can fetch the data from tables across companies using crossCompany keyword in X++ select queries. Suppose you have a requirement to get the data from multiple companies in AX 2012 using X++ then in this scenario we can use crossCompany. You can also use containers to fetch data from subset of companies. For example: public void TestCrossCompanyUse() { CustTable custTable; container desiredCompanies = ['A', 'B']; // A and B are companies name int iCountCompanies = 0; while select crossCompany : desiredCompanies * from custTable { info(strFmt("%1, %2", custTable.AccountNum, custTable.dataAreaId)); ...
Custom lookup in AX 2012
- Get link
- X
- Other Apps
Dear Friends, Today, in this post we are going to share how you can add custom lookup in your form control in AX 2012. Let's start... 1) In the AOT, expand Forms, expand the form, expand Designs, right-click Design. Add or drag a new control in the design section of form. Example : You can drag a string field from your form data source. 2) Expand the control on which you want to add the custom lookup, right-click Methods, click Override method, and then click lookup. The lookup method opens in the code editor. 3) Copy paste the below code. public void lookup() { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange queryBuildRange; SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(custTable), this); sysTableLookup.addLookupField(fieldNum(CustTable, AccountNum)); sysTableLookup.addLookupField(fieldNum(CustT...
Fetch the customer details using X++ in AX 2012
- Get link
- X
- Other Apps
Hi Technical, Today, in this post we are going to share a X++ code to fetch the customer details as customer number, customer name, primary address, country, sales channel, sales rep., region, territories, agent, sales manager in AX 2012. When you run this X++ code in AX 2012, an excel will generate with all the data. Output: To fetch this data create an AX job in AOT and copy paste the below code. // Project Name: PKA_Adhoc_CustomerDetaills // Created By: Chirag Gupta // Created Date: 29-Jan-2020 // Summary: Fetch the customer details as customer number, customer name, primary address, // country, sales channel, sales rep., region, territories, agent, sales manager. static void PKA_GetCustomerData(Args _args) { CustTable custTable; smmBusRelChainGroup ...
Invalid Command Line. Unknown Switch : Axconfig. While opening the visual studio shortcut with /AxConfig Parameter
- Get link
- X
- Other Apps
Hi Technical, Today, we faced a weird issue while opening Visual Studio from AX 2012. Error: Invalid Command Line. Unknown Switch : Axconfig. Use: devenv [solutionfile | projectfile | anyfile.ext] [switches] Solution: It is because of two reasons either Visual Studio tools are not installed properly or Visual Studio is not compatible with AX 2012. Follow the steps for installing visual studio 2013 tools: 1) Run AX setup. 2) Select Visual Studio 2013 tools from Developer tools option. 3) Run the prerequisite validation if all okay then go ahead, in our case we got one error. 4) For AX 2012 R3 Visual Studio 2013 update 2 is must so asked your System Admin to install the update. 5) Once update 2 installed, install the visual studio 2013 tools again. 6) Restart the server after complete installation. 7) For configuration the visual studio, open the Start menu, right-click Visual Studio and select Properties. 8) Upd...
Send email in AX 2012 using X++
- Get link
- X
- Other Apps
Hi Readers, Today, in this post we are going to share a X++ code to send email in AX 2012 using X++. // Create By: Chirag Gupta // Created Date: 2-Apr-2020 // Summary: This job will be used to send an email using AX 2012. static void PKA_TestEmail(Args _args) { // Set these variables. str sender = 'axsupport@domain_name.com'; str recipient = 'test_emailTo@domain_name.com'; str cc = 'test_emailCC@domain_name.com'; str ...
For more information about this error navigate to the report server on the local server machine, or enable remote errors - SSRS Report Error
- Get link
- X
- Other Apps
Hi Technical, Today, in this article we are going to share a solution for below error while printing SSRS Report in AX 2012. Error: For more information about this error navigate to the report server on the local server machine, or enable remote errors. Solution: Step 1: a) Navigate to System administration/Area page/Setup/Services and Application Integration Framework/Inbound ports. b) Click on BI Services and Deactivate this. c) Now, Activate the BI Services and for testing check any invoice report. It is works then okay otherwise check step 2 below. Note : No need to take a downtime for this step. Step 2: Restart SSRS Services and for testing check any invoice report. It is works then okay otherwise check step 3 below. Step 3: a) Take a downtime for production if you are facing this issue in Live server. b) Delete all client session. c) Restart AOS. d) Restart SSRS Services. e) Now, check any SSRS Report, it should work. We hope thi...
Fetch vendor address using X++ in AX 2012
- Get link
- X
- Other Apps
Hi Technical, Today, in this post we are going to share a piece of code by which you can fetch vendor address using X++ in AX 2012. Create a AOT job and copy paste the below code to export vendor address in excel. // Project Name: PKA_WO67963_FetchCustomerVendorAddress // Created by: Chirag Gupta (ibm.chirag) // Created date: 18-Dec-19 // Summary: Fetch Vendor ID, Name or description, Address, Purpose, Primary static void PKA_VendorAddress(Args _args) { SysExcelApplication xlsApplication; SysExcelWorkBooks xlsWorkBookCollection; SysExcelWorkBook xlsWorkBook; SysExcelWorkSheets xlsWorkSheetCollection; SysExcelWorkSheet xlsWorkSheet; SysExcelRange ...
Fetch customer address using X++ in AX 2012
- Get link
- X
- Other Apps
Hi Technical, Today, in this post we are going to share a piece of code by which you can fetch customer address using X++ in AX 2012. Create a AOT job and copy paste the below code to export customer address in excel. // Project Name: PKA_WO67963_FetchCustomerVendorAddress // Created by: Chirag Gupta (ibm.chirag) // Created date: 18-Dec-19 // Summary: Fetch Customer ID, Name or description, Address, Purpose, Primary static void PKA_CustomerAddress(Args _args) { SysExcelApplication xlsApplication; SysExcelWorkBooks xlsWorkBookCollection; SysExcelWorkBook xlsWorkBook; SysExcelWorkSheets xlsWorkSheetCollection; SysExcelWorkSheet xlsWorkSheet; SysExcelRange ...
Product attributes value by item id using X++
- Get link
- X
- Other Apps
Hi Technical, Today, in this post we are going to share a piece of code to fetch product attributes value by item id using X++ in AX 2012 R2/R3. Create a AOT job and copy paste the below code: // Created By: Chirag Gupta // Created Date: 28-Jan-20 // Summary: Get product attributes values by item id. static void PKA_GetProductAttributes(Args _args) { InventTable inventTable; EcoResProductAttributeValue ecoResProductAttributeValue; EcoResAttribute ecoResAttribute; EcoResValue ecoResValue; while select inventTable where inventTable.ItemId == "FGBRDASS0001" join RecId from ecoResProductAttributeValue ...
SSRS Error: There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs
- Get link
- X
- Other Apps
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.
- Get link
- X
- Other Apps
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 !!