15 January 2016

DIXF: DMFProductEntity - displayProductNumber auto generate not working

When importing products to staging table with the Data Import Export Framework through the Entity DMFProductEntity with auto generated displayProductNumber we faced the error message "Numbersequence not set". This is due to the fact that MS has used another EDT in the DMFProductEntity.
The following Workaround helps importing products with generated numbers.
  1. Extend the NumberSeqModuleInventory.loadModule() with the following Code:
// Setup product display number for DMFProductEntity
    datatype.parmDatatypeId(extendedtypenum (EcoResProductDisplayProductNumber));
    datatype.parmReferenceHelp("@SYS301183");
    datatype.parmReferenceLabel(literalstr("@SYS133863"));
    datatype.parmWizardIsContinuous(false);
    datatype.parmWizardIsManual(NoYes::No);
    datatype.parmWizardIsChangeDownAllowed(NoYes::No);
    datatype.parmWizardIsChangeUpAllowed(NoYes::No);
    datatype.parmSortField(1);
    datatype.parmWizardHighest(999999);
    datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);
    this.create(datatype);
  1. Change the method from protected to public
  2. Create a job to call the loadModule method:
    NumberSeqModuleInventory numberSeqModuleInventory = new NumberSeqModuleInventory();numberSeqModuleInventory.loadModule();
  3. Change the method back to protected
  4. Go to Inventory and Warehousemanagement Parameters and set the Number Sequence for Product Number. You could use the same Number Sequence as for Item Number or create a new one.
              
     

07 January 2016

Dynamics AX (AX7) shortcuts

I started playing around with the new Dynamics AX. When looking at the new user interface my first and main concern is the usabilty. So I tried to create a customer and a sales order as fast as possible :)
But be aware that keyboard shortcuts are not the same as in AX 2012 and earlier versions.
For example: don't use STRG + N anymore. It is now ALT + N :)

To help us getting comfortable with the new UI the Dynamics 'AX 7' Technical Preview Help Wiki is a good starting Point.
There you can also find a list of keyboard shortcuts: https://ax.help.dynamics.com/en/wiki/shortcut-keys/


02 December 2015

axUpdate Setup Log Files

When something is not working as expected during installation I always check the log files first. For Dyanmics AX they are normally stored in the AX application Folder like for example:
C:\Program Files\Microsoft Dynamics AX\60\Setup Logs\2015-12-02 11-11-11

If you install an update with the axupdate.exe the log is created in another Folder: C:\ProgramData\Microsoft\Dynamics AX\Dynamics AX Setup Logs
%ALLUSERSPROFILE%\Microsoft\Dynamics AX\Dynamics AX Setup Logs

So keep in mind to check that Folder as well.

23 November 2015

Video: Introducing the New Microsoft Dynamics AX

Video about the new Dynamics AX (AX 7)

04 November 2015

Publish reports on several SSRS servers

When updating more than one AOS with new code you probably want to publish new SSRS Reports to more than one SSRS Server. The following powershell script will help a lot.
Thanks to Allan Andersen


$SSRSServers = "SSRS-Test", "SSRS-Training", "SSRS-Demo", "SSRS-Prod"

ForEach ($SSRSServer in $SSRSServers)
{
    #create PowerShell Session

    $PSSession = New-PSSession -EnableNetworkAccess -Name $SSRSServer

    Invoke-Command -Session $PSSession -ArgumentList $SSRSServer -ScriptBlock
    {
        #load AX ManagementUtilities 

        .'c:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Microsoft.Dynamics.ManagementUtilities.ps1' 

        #publish report
        Publish-AXReport -Id $args[0] -ReportName * -ModifiedAfter (Get-Date).AddDays(-30) -Verbose
    }

    Remove-PSSession $PSSession



Depending how you do deploy Reports in your Environment you can also use WSDL Port ( -ServicesAOSWSDLPor) or other parameters of the Publish-AXReports command.

29 October 2015

DIXF refresh target entity mapping

If you need to update all target mappings in one go, the following job will help you :)


static void DIXFRefreshTargetEntityMap(Args _args)
{
    DMFEntity   entity;

    if (Box::yesNo('Are you sure you want to update all target mappings?'
                 DialogButton::No) == DialogButton::Yes)
    {
        while select entity
        {
            DMFTargetXMLToEntityMap::generateMapping(entity, true);
        }

        info('done');
    }
}

27 October 2015

Time and Attandance posts

Lately I found a very good blog that describes the whole time and attendance functionality in 31 blog posts. So if you need detailed information about this topic start reading here:

https://dynaxtips.wordpress.com/2015/03/01/time-and-attendace-get-started/