Tuesday, December 17, 2013

AX 2012 - Deploy Reports Timeout

Hi

Today i'm facing some problem during SSRS report deployment.

When I deploy the report one by one using management utilities I am able to deploy the reports.
But if i deploy all the reports (publish-axreport -reportname *), it is throwing the connection timeout.

This problem was caused by the low Available Memory and resources on AOS Server.
I have restarted the AOS service and the Deploy of all Reports have finished with success!

Enjoy!

Tuesday, December 10, 2013

AX 4.0 - Object Server 01: No ping from xxx. Terminating the session.

Hi All

Few time ago i faced a problem with AX 4.0 with the following error :

Object Server 01: No ping from xxx. Terminating the session

After many check on network, Sql and on AOS Servers, i have Compile All Application and after that the problem disappear.

Enjoy!

Friday, October 25, 2013

AX 2012 - Deploying customizations across Microsoft Dynamics AX 2012 environments


HI

During deploy customizations across different environments, read WELL the link below :

Maintaining Installation-Specific Element IDs and Element Handles


However, the important things to know are :

During import, element IDs are assigned based on the following rules, in this order:
  1. If an element already exists that has the same Origin value as the imported element, replace the existing element and reuse its ID.
  2. If an element already exists that has the same Type, Name, and ParentID values as the imported element, replace the existing element and reuse its ID.
  3. If the imported element has a LegacyID value, and the LegacyIDvalue is available on the target system, add the following setting to the element: ID = LegacyID.
  4. Assign a new installation-specific ID from a guaranteed free range that does not collide with any LegacyID values.
    • For fields that are in tables that use table inheritance, use an ID number that is greater than 20000.
    • For fields that are not in tables that use table inheritance, use an ID number that is greater than 60000.
    • For indexes, use an ID number that is greater than 60000.
    • For all other elements, use an ID number that is greater than 100000.

During import, element handles are assigned based on the following rules, in this order:

  1. If an element already exists that has the same Origin value as the imported element, replace the existing element and reuse its handle.
  2. If an element already exists that has the same Type, Name, and ParentHandle values as the imported element, replace the existing element and reuse its handle.
  3. Assign a new installation-specific handle that uses the next free handle, or Max+1.

So, if during an Model import appear an error like :

"Violation of UNIQUE KEY constraint 'I_ModelElement_ElementName" . Cannot insert duplicate key in object 'dbo.ModelElement'. The duplicate key value is ObjectName.

mean that exist an different Object on Destination Environment with the same Origin Value Field of the ObjectName show in the error.
In this case, according the situation, we have to understand what's to do.
If is an useless object, you can start AX and delete it. Finally, rerun the import.


Enjoy !
 

AX Utility and Tip


Cross References

Generate a project with application objects from "used by" cross-references

Setting breakpoints from cross reference and search result windows



ID change in Dynamics AX data dictionary

Restore AX database in different domain




What is my data distribution by company(DATAAREAID) for a specific Dynamics AX table?


A Power shell script for updating admin user SID and other details

“The Art Of Debugging” – Tip 3 – Instrumenting your code using the Event Log

Consuming a Web Service in AX 2012 is easy

Client Access Log (Dynamics AX 2012)

Export all shared projects

Online formatting Sql Stantement

Translate text with Microsoft Translator from AX

PowerShell script to restart Windows (AOS) services remotely

Cleaning up after AxBuild.exe

Changing the Background Color on AX Forms in AX 2012

Color code forms in AX 2012, depending on environment/company

AX 2012 Development Cheat Sheet / X++


Import\Export

AX 2012 Consignor solution available on CodePlex

Deployment Customizations across more Environment

Model store deployment using batch files

How We Manage Development - Automated Builds


Enjoy !

Thursday, October 10, 2013

Friday, August 9, 2013

How to Filter a Table with two Date Field

Below the code to filter a Table that have two date field and one only Filter Date :


    SysQuery::findOrCreateRange(Tablename_ds.queryBuildDataSource(),

                       fieldNum(Tablename, Fromdate)).

                       value( strFmt("(((%1==%2) || (%1<=%3) ) && ((%4==%2) || (%4>=%3))) || (%3==%2)",

                        fieldStr(Tablename, fromDate),

                        Date2StrXpp(DateNull()),

                        Date2StrXpp(FilterDate.dateValue()),

                        fieldStr(Tablename, toDate) ));  

Enjoy !

Wednesday, July 24, 2013

AX2012 R2 : Synchronize Table – Failed to create a session

Hi All

Today during a DB Sync compare at the end the follow error:

Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics

The code in error was on class SysSetupInstaller Method loadAllData on RunAs command.

After some investigation, I have found on Table USERINFO two records with ADMIN ID ( I have two Partitions ) where the first one had a wrong SID !
After update with the right SID, the Sync process finished with success.

See also AX2012 R2 : DB Sync – Failed to create a session

Enjoy !

Tuesday, July 23, 2013

AX 2012 - There is already a listener on IP endpoint 0.0.0.0:8201

Hi

I have a Server with 3 AOS Services with AX 2012 CU 1.

Today i have install CU 6 !

After that, all AOS Services except the first, give me an error during startup :

Object Server 02: System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:8201. Make sure that you are not ......

I have verify that the files Ax32Serv.exe.config have been modified from the CU 6 setup.
In details, the Service Port and Wsdl Port had the same values as the first AOS Service !

I have modify the Config file with the right values on Service Port and Wsdl Port in all places.

After that, all work fine !

Enjoy !

Thursday, July 18, 2013

Update AX User SID

Hi

When you move an AX Database from different domain, is necessary to update the AD User SID.
Below a nice job.

Enjoy !



static void UpdateSID(Args _args)
{
    UserInfo                UserInfo;
    AxaptaUserManager       aUserManager = new AxaptaUserManager();
    DomainName              networkDomain;
    Sid                     sid;
    ;
    networkDomain = (select networkDomain from UserInfo
                      where UserInfo.id == curUserId()).networkDomain;
    info(networkDomain);
    while select forUpdate UserInfo
        where  UserInfo.networkAlias
            && UserInfo.id != "Guest"
    {
        try
        {
            ttsBegin;
            info(UserInfo.networkAlias);
            sid = aUserManager.getUserSid(UserInfo.networkAlias, networkDomain);
            if( !sid )
            {
                warning(strFmt("Utente %1 non presente in active directory, domain %2", UserInfo.name, networkDomain));
                continue;
            }
            UserInfo.networkDomain  = networkDomain;
            UserInfo.sid            = sid;
            UserInfo.update();
            ttsCommit;
        }
        catch
        {
            warning(strFmt("Impossibile modificare l'utente %1", UserInfo.name));
        }
    }
}

 

Monday, July 8, 2013

How can I get list of tables in a table collection ?


    SysDictTableCollection  tableCollection;
    SysDictTable            SysDictTable;

    TableName               tableName;
    Str                             sqlTableName;
   
    ;
    tableCollection = new SysDictTableCollection("TableCollationName");
    tableName       = tableCollection.nextTable();
    while (tableName)
    {
        SysDictTable = New SysDictTable(tablename2id(tableName));
      
        sqlTableName = SysDictTable.name( DbBackend::Sql );
        If ( ! sqlTableName)
            Continue;
       
        Info ( tableName + " - " + sqlTableName );
       
        tableName = tableCollection.nextTable();
    }


Enjoy !

Wednesday, June 12, 2013

IDMF - Bulk copy in Archive DB Rolledback

Hi All

Today, during an archiving project, I received the follow message: Bulk copy in Archive DB rolledback.

I checked the IDMF Log folder and I saw that the process crashed during the Bulk Copy of a table.

So, I have activated the SQL Server Profiler and the error was due to the attempt to insert a key double.

Enjoy !
 

Thursday, February 28, 2013

Dynamics AX 2009/2012 Client Crash on Startup

Hi All

Today i'm facing an issue on AX 2009.
During startup the Client going in Crash withount useful informations.

The step for fix the issue are :

1- Stop AOS
2- Delete from application AXAPD.AOI file
3- Delete from application all *.ali file
4- Start AOS

If happen on AX 2012 follow the same steps above, except the step 2.

Enjoy !

Wednesday, February 6, 2013

AX 2012 Feature Pack on SQL Server 2012

Hi All

Today i have Install AX 2012 Feature Pack with SQL Server 2012!

For use SQL Server 2012 is mandatory copy the Cumulative Update 4 on Update folder of AX 2012 R1 Setup before to install.


Then you have to install the Microsoft Dynamics AX hotfix 2680186
After that you have to apply the patch to take effect in Model Store, so run the following command "axutil schema" from the AOS bin Folder !!

See also How-to update Dynamics AX2012 from SQL Server 2008R2 to SQL Server 2012

Finally, you have to install :

Microsoft® System CLR Types for SQL Server® 2008 R2
Microsoft® SQL Server® 2008 R2 Shared Management Objects (SMO)

before install AX 2012 Reporting Extensions.

Enjoy!

 

Monday, January 14, 2013

AX 2012 - ODataQueryService Paging Setting - Uncontrolled TempDB Grow

Hi


Here a link with useful information’s about Microsoft Dynamics AX 2012 ODataQueryService.
We can find also an explanation about the issue related the uncontrolled TempDB grow

ODataQueryService Paging Setting for AX 2012


Enjoy !

Wednesday, January 2, 2013

AX 2012 - Help Server Issues

AX 2012 - HelpServer error : System.InsufficientMemoryException

Hi All

If you have receive the below error while accessing your Help Service, mean that your server is having very low free memory.

To skip the problem you can modify the web.config file of your DynamicsAX6HelpServer site and add the follow attribute ( minFreeMemoryPercentageToActivateService ) :



 

The error message is something like :


"Memory gates checking failed because the free memory (14618624 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element."

Enjoy