Install PowerShell Module

There is the commande for installing the PowerShell module on your computer:

#
# EXECUTE THIS IN POWERSHELL WITH "RUN AS ADMINISTRATOR" OPTION
#

# AUTHORIZE REMOTE SIGNED COMMAND
Set-ExecutionPolicy RemoteSigned

# IMPORT THE POWERSHELLGET MODULE
Import-Module PowerShellGet

# INSTALL THE AZURE MODULE
Install-Module Azure -Force -AllowClobber
Install-Module AzureRM -Force -AllowClobber

# UPDATE THE POWER SHELL HELP
Update-Help

 

Advertisements

Interesting Dynamics posts

Dynamics 365

 

Customize the Open in Microsoft Office menu

https://ax.help.dynamics.com/en/wiki/customize-open-in-office-menu

 

Release Dynamics 365 for Operation platform update 4

https://community.dynamics.com/ax/b/dax/archive/2017/02/23/we-re-excited-to-release-dynamics-365-for-operations-platform-update-4

Bug with LCS : https://blogs.msdn.microsoft.com/lcs/2017/02/24/issue-with-update-tile-in-microsoft-dynamics-365-for-operations-platform-update-4-release-on-lcs/

 

Add Deep Link to reports (SSRS)

https://blogs.msdn.microsoft.com/dynamicsaxbi/2017/02/26/how-to-add-deep-links-to-reports-ssrs/

 

The right cloud option for your business

https://community.dynamics.com/b/msftdynamicsblog/archive/2017/02/23/the-right-cloud-option-for-your-business

avec le on-premise prévu en Q2 CY2017

 

 

Dynamics AX 2012

 

AX 2012 – TFS multiple workspaces

http://sinedax.blogspot.be/2017/02/ax-2012-tfs-multiple-workspaces.html

 

AXBUILD fails with a “System.IO.IOException: The file exists” error

http://www.agermark.com/2017/02/axbuild-fails-with-systemioioexception.html?spref=tw

Using #localmacro

Using the option #localmacro can reduce the size and also the visibility of your code.

For example, you create a while select statement and you have to control date range when some value are enable (so not all the time)

You can write this kind of code :

protected void doProcess()
{
    #localmacro.CheckDateDelivery
        (salesTable.DeliveryDate >= fromDate && salesTable.DeliveryDate <= toDate)
    #endmacro

    #localmacro.CheckDateDocument
        (custPackingSlipJour.DeliveryDate >= fromDate && custPackingSlipJour.DeliveryDate <= toDate)
    #endmacro
    ;

    while select salesTable
    where (!validatedOrTransmited   || ((salesTable.MySalesStatus    == MyStatus::Transmission
                                    ||   salesTable.MySalesStatus    == MyStatus::Validation))
    && #CheckDateDelivery)
    &&    (!prepared                ||  (salesTable.MySalesStatus    == MyStatus::Prepare
    && #CheckDateDelivery))
    &&    (!delivered               ||  (salesTable.MySalesStatus    == MyStatus::Delivery))
    exists join firstOnly custPackingSlipJour
    where   custPackingSlipJour.SalesId == salesTable.SalesId
    &&     (!delivered  || #CheckDateDocument)
    {
        // code here.
    }
}

AX2012 : Top 10 issues discovered from Dynamics AX Code Review

Description of the article :

Three years ago, the Premier Field Engineer team started the delivery of the Dynamics AX Code Review for Premier customers. It has been quite an interesting journey seeing many customization from different instances. Today I would like to step back and reflect on some of the most common issues.
If you are a senior developer on Dynamics AX, you may wonder how come these issues still exist. This is the reason why I decided to write this article. Developments are now shared among diverse team, sometimes across multiple partners and outsourced to vendors, meaning different skills and processes. Therefore such well known issues still remain in production when customized best practices rules and internal review are not properly defined.

The following list is not exhaustive and is only based on our experience from the field.

Find the complete MSDN post here : http://blogs.msdn.com/b/axinthefield/archive/2014/02/18/top-10-issues-discovered-in-the-dynamics-ax-code-review.aspx

Get Account from LedgerDimension

If you are using Ledger* table , you can have the field LedgerDimension (which extends LedgerDimensionAccount).

This field contain multiple information. For example the CustAccount.

To retreive the CustAccount from this field, use this piece of code:

custAccount = DimensionStorage::ledgerDimension2AccountNum(bankCodaAccountStatementLines.LedgerDimension);
Posted in AX6

“The network path was not found” with a clustered SQL Server

You can maybe find this error message when you using a clustered SQL Server.

You cannot create/delete a new model (from AX client or from AxUtil.exe tool) but can still make a listing of all model.

In fact, all writing modification cannot be done.

So if you are in this kind of problem, the first things to make is to check on all nodes of the clustered server if the following port are open (and check also in the client side) :

  • Remote Registry: 139
  • Remote administration: 445

Check correctly the setting of the firewall !

Blocking copy / Ctrl+C in a grid

I’ve hear that this request is often asked.

So there is a little piece of code to block all copy of data in a grid (for all form)

If you want to do this only on one form, you need to overwritte the method taks in the form

 

For my case, you need to select the method “task” on the class “SysSetupFormRun’ and write this:

FormControl form;
//standard code
if (_p1 == #taskCopy)
{
    form = this.control(this.selectedControl().containerId());
    if (form && form.handle() == classNum(FormGridControl))
    {
        //warning('Cannot copy on this grid!');
        return 0;
    }
}
ret = super(_p1);
return ret;

And for disable the copy on a specific field :

In the code I use this : this.selectedControl().containerId()
The method selectedControl return the fields on which we are, so you need simply use this : (with ItemName as fieldName from SalesTable form)

   if (_p1 == #taskCopy)
   {
       form = this.selectedControl();
       if (form.name() == 'ItemName')
       {
           //warning('Cannot copy this field!');
           return 0;
       }
   }

My original post : http://blogs.msdn.com/b/sebastien-petre/archive/2013/02/21/blocking-copy-ctrl-c-on-a-grid.aspx

AX 2012 and Office 365

Some of you would maybe know if AX 2012 is compatible with Office 365.

The answer is yes and no.

Yes you can use Word and Excel if the Office Add’on is installed and the software installed on the machine?

But there is some problems with Outlook. AX 2012 don’t support the TLS encryption which is mandatory when using Outlook.

 

More informations about Word and Excel here : http://blogs.msdn.com/b/chrisgarty/archive/2012/02/27/can-dynamics-ax-2012-work-with-office-365.aspx