Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, January 28, 2014

Deploy the default reports [AX 2012]

Hi,

Open Windows PowerShell as an administrator by following these steps:
·         Click Start > Administrative Tools.
·         Right-click the Microsoft Dynamics AX 2012 Management Shell option.
·         Click Run as administrator.

In the Windows PowerShell

Publish-AXReport -ReportName CustTransList

Above code is to deploy specific report

Below code to deploy list of reports
Publish-AXReport -ReportName CustTransList, CustTransOpenPerDate

To deploy all reports, enter the following command:
Publish-AXReport –ReportName *
Regards,

Friday, January 17, 2014

error 105: Unable to resolve the server's DNS address

Hi,

Start > All Programs > Accessories > Command Prompt. Right click on it and 'Run as Administrator'. Type the following and hit enter: ipconfig /flushdns

Regards,

Thursday, January 16, 2014

ManagementUtilities- axutil export- exporting the model in Dynamic AX 2012

Hi,



For exporting command:

Go to run-cmd

cd C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities

Give enter

C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities>

axutil export /model:ABC /file:C:\ABCmodel.axmodel /config:MicrosoftDynamicsAX

Give enter

Y


ABC- is a model used

ABCModel.axmodel Saving file in c drive

MicrosoftDynamicsAX-instance name


Regards,

ManagementUtilities- axutil import- importing the model in Dynamic AX 2012

Hi,


For model importing:
Go to run-cmd
  cd C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities
Give enter
C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities>
axutil import /file:C:\ABCmodel.axmodel /config: MicrosoftDynamicsAX /conflict:PUSH /createparents:ON
Give enter
Y


MSG will come as "model is successfully imported"
here ABCmodel.axmodel- is model that i saved
MicrosoftDynamicsAX-instance name(services/server aos/client configuration instance name)

Regards,

Overview of Microsoft Dynamics AX build numbers

Recent Build numbers from Microsoft
 Microsoft Dynamics AX 2012 R2
Version
Build number
[kernel / application]
Comment
Link
Recent published kernel build
6.2.1000.4838
13 Nov 2013
Recent published Retail POS build
6.2.1000.4810
11 Nov 2013
Cumulative Update 7
6.2.1000.4051
01 Nov 2013
Cumulative Update 6
6.2.1000.1437
26 Jun 2013
Cumulative Update 1
6.2.1000.156
26 Feb 2013
Hotfixes
6.2.1000.xxx
RTM
6.2.158.0
01 Dec 2012
 Microsoft Dynamics AX 2012
Version
Build number
Comment
Comment/Link
Recent published kernel build
6.0.1108.5958
10 Nov 2013
Recent published Retail POS build
6.0.1108.5861
25 Oct 2013
Cumulative Update 5
6.0.1108.4316
29 Apr 2013
Cumulative Update 4
6.0.1108.2423
02 Dec 2012
Cumulative Update 3
6.0.1108.670
28 Jun 2012
Cumulative Update 2
6.0.947.280
16 Nov 2011
Cumulative Update 1
6.0.947.61
01 Aug 2011
Hotfixes [new]
6.0.1108.xxx
After 15 Feb 2012
Hotfixes [old]
6.0.947.xxx
Until 15 Feb 2012
Feature Pack 1
6.0.947.862
Solution build 6.1.1108.0
RTM
6.0.947.0
01 Aug 2011
http://blogs.msdn.com/resized-image.ashx/__size/16x16/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-16/3527.LogoSmall.png Microsoft Dynamics AX 2009
Version
Build number
 Comment
Link
Recent kernel build
5.0.1600.2194
05 Oct 2013
Recent published Retail POS build
5.0.1600.2194
05 Oct 2013
Retail
01 Jun 2012
Process Industries 3.1
25 Mar 2012
Project Time Management
25 Mar 2012
Professional Services Automation
25 Mar 2012
Payroll
01 Apr 2013
Rollup Update 8
5.0.1500.6491
21 Mar 2012
Rollup Update 7
5.0.1500.4570
25 Apr 2011
Rollup Update 6
5.0.1500.3761
16 Dec 2010
Rollup Update 5
5.0.1500.2985
30 Jun 2010
Rollup Update 4
5.0.1500.2116
22 Mar 2010
Rollup Update 3
5.0.1500.1313
22 Sep 2009
Rollup Update 2
5.0.1500.809
29 Jun 2009
Rollup Update 1
5.0.1500.358
12 Apr 2009
Hotfixes [New]
5.0.1600.xxx
After 18 Apr 2012
Hotfixes [Old]
5.0.1500.xxx
Until 18 Apr 2012
Service Pack 1
5.0.1000.52
Nov 2008
RTM RU-6
5.0.593.1429
RTM RU-5
5.0.593.1287
RTM RU-4
5.0.593.1084
RTM RU-3
5.0.593.827
RTM RU-2
5.0.593.662
RTM RU-1
5.0.593.439
RTM Hotfixes
5.0.593.xxx
Until 25 Apr 2011
RTM
5.0.593.0
2 Jun 2008
Microsoft Dynamics AX 4.0
Version
Build number
Comment
Link
Latest Kernel Build
4.0.2503.1610
22 Jun 2011
Hotfixes
Until 17 Oct 2011


Dynamics AX 2012 R2 CU7 Installation error

Importance of CU7:
Only  15 minutes to CU7 compiler
Data Import/Export Framework in AX2012 R2 CU7
----------
While install CU7 on a CU6 environment, an error appears when the new models are being imported.
Error results in:
Error updating model database: Microsoft.Dynamics.Setup.AxSetupException: AxUtil call returned errors:The model contains a customization of a configuration key. The model cannot be imported because you can overlayer a configuration key from the patching layer only.

Both CU6 and CU7 use the same model name "Update for Foundation" with a different display name.("Foundation ([KB#])" with KB# equals to their respective KB number.) And as suggested in the error message configuration key changes in CU6 blocked the installation.

Uninstall the existing CU6 model first will allow the installation to proceed. However, please do note that this work around does NOT guarantee element ID consistency and is not suitable for production system. 


Tuesday, January 14, 2014

"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.."

 Hi,
Error is

"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.."


Go System administration > Setup > Services & Application Integration Framework > Inbound ports.

Select BIServices port, Activate same. 

//Some time you will get this below error for that.


For that please follow below.
Goto AOT >> Service Groups >> BI Services, double check it has two services
Also check both services has the underline service operations:

If everything is correct then U can right click on BIServices service group and say Deploy Element.  


Regards,


Monday, January 13, 2014

Binding operation failed to allocate buffer space - Dynamic AX 2012

Hi,

QueryRun and Query Objects - Binding operation failed to allocate buffer space
So if you ever work with the QueryRun and Query objects within X++, and I mean work with them a lot. You might come across an issue.

If for some reason, your start to see the following in thrown errors or in the event viewer, Application event log on the AOS, then you have an issue most likely with the QueryRun and Query Objects.:
Binding operation failed to allocate buffer space


The issue that your facing is the query that your creating. The query your creating, to make use with your QueryRun object is causing the AOS to hit a buffer limit. You can increase the buffer limit at the AOS. But most likely what you will need to do is force literals for the query your building in X++.

It's simple to do, after your create an instance of the Query object simply do a:
Query.literal(1); call.

This will 'force the hand' of the AOS to accept the buffer allocation requirement, and allow your advanced query to run. Therefore allowing your QueryRun operation to finish as desired.

Well that's all for now. Ran into this, and thought it would be worth putting out here. If anyone has ran into this before, and wants to share feel free to leave a comment. Also if you have more details about literals and the use as described above, feel free to share that as well.

Recently we were confronted with a case where we received the following SQL error:
[Microsoft][SQL Native Client][SQL Server]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
This error occurs if we are running into a SQL limitation which does not allow more than 2100 parameters in a SQL statement.
Usually it's a Select statement where AX produces OR clauses with too many parameters like
WHERE RecId = xxxxxx OR RecId = xxxxxy OR RecId = xxxxyx ...
or IN clauses like
WHERE ID IN (xxxxxx,xxxxxy,xxxxyx, ...)


How to find where this select statements are coming from?
In the SQL statement trace log (Administration -> Inquiries - Tab 'Use') you will find the stack trace that shows you which method caused the SQL error.
How to fix this problem?
We have to add a forceliterals to the select statement in the relevant method.
Adding a forceliterals should avoid running into the SQL limitation of the 2100 parameters, because the statement is handled differently then.
The related statement could either be an X++ select statement or a X++ Query
X++ Stament

Change code from
select from TableName

to

select forceliterals from TableName
X++ Query

Activate forceliterals on the Query object
query.literals(true);


Error Message (17:05:20) Stack trace: Binding operation failed to allocate buffer space.
(C)\Classes\QueryRun\next
(C)\Jobs\Job4 - line 29
This relates back to the maximum buffer size set in the database tuning tab of the server configuration utility. This buffer is used for binding of input and output parameters for SQL statements. So for example:
Select * from MyTable where field1= @p1 <- this is the input parameter
Ax declares input parameters based on size of the field, rather than on the size of the value being passed. The size of the value used is the total length of the field plus one. The default buffer is 24576 bytes. Each character is allocated 2 bytes. This equates to a maximum of roughly 12288 characters length of input parameters. It is also necessary to be mindful of the RPC upper limit of 2100 parameters, so it is not possible to have more than 2100 input parameters, or the error below will appear:
SQL error description: [Microsoft][SQL Native Client][SQL Server]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
This relationship between buffer size, field length and the number of input parameters can be expressed as below:
MaximumBufferSize / ((FieldLength + 1)*2) = NumberOfPossibleInputParameters
To avoid this limitation altogether it is possible to set the query to use literals, this will mean that input parameters are not used, and therefore the buffer limit does not apply.
More information on the RPC error is available here:
Note: please do not confuse the maximum buffer size in the AOS configuration utility (which applies here) with the maxBufferSize registry key, they are unrelated.



Regards,

FileNameSplit() to slip the Directory, file name and extension in D365 FnO

 Hi,     /// <summary>     /// Validate the Fileformat     /// </summary>     /// <param name = "filepath">FileP...