Alfasith AX

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

Wednesday, June 26, 2019

Getting current user languague in SSRS in AX 2012

Hi,

=iif(Parameters!AX_RenderingCulture.Value = "ar",FALSE,TRUE)

Note:  No needs to validate using controller class or passing the values in DP class for this.

In my case, I needs to change the order ofcolumn of the table in SSRS without reference to arabic from right to left and rest left to right.

So I added visibity based on expression on both the lines as Arabic and rest

Monday, June 17, 2019

Get the current user worker Information

Hi,

this.ChangedBy = HcmWorker::find(DirPersonuser::findUserWorkerReference(curUserId())).RecId;

Regards,

Tuesday, June 11, 2019

Add *.dll to the GAC - Global assembly cache for Windows Server 2012 or later - Using Developer CMD Prompt for Visual Studio.

Hi,


Installing the assemble in to global cache

What is GAC
           The Global Assembly Cache is a machine-wide store used to hold assemblies that are intended to be shared by several applications on the machine. Each computer where the common language runtime (CLR) is installed has a global assembly cache.

How to load/ Add *.dll
I needs load my custom *.dll files developed in dotnet to be used in AX or application wide.

This can be achieved in multiple ways like.

 1. Power-shell commands.
 2. CMD prompt.
 3. Developer CMD Prompt for Visual Studio.
 and few more

This post is using CMD Prompt

i.e calling Global assembly cache tool.

 1. Run CMD prompt as administrator
 2. Mention your dll path in targetPath.
 3. Mention your dll name in highlighted text with the extension as .dll


gacutil.exe /i "$TargetPath" /f /nologo
gacutil /i "$hello.dll" /nologo

Regards

Add *.dll to the GAC - Global assembly cache for Windows Server 2012 or later - Using CMD prompt

Hi,


Installing the assemble in to global cache

What is GAC
           The Global Assembly Cache is a machine-wide store used to hold assemblies that are intended to be shared by several applications on the machine. Each computer where the common language runtime (CLR) is installed has a global assembly cache.

How to load/ Add *.dll
I needs load my custom *.dll files developed in dotnet to be used in AX or application wide.

This can be achieved in multiple ways like.

 1. Power-shell commands.
 2. CMD prompt.
 3. Developer CMD Prompt for Visual Studio.
 and few more

This post is using CMD Prompt i.e calling Global assembly cache tool.

 1. Run CMD prompt as administrator
 2. Setting your VS SDK path in first line
 3. Mention your dll path in targetPath.
 4. Mention your dll name in highlighted text with the extension as .dll

cd C:\Program Files\Microsoft Visual Studio 8\SDK\V2.0\Bin
gacutil.exe /i "$TargetPath" /f /nologo
gacutil /i "$hello.dll" /nologo

Regards

Add *.dll to the GAC - Global assembly cache for Windows Server 2012 or later - Using Powershell

Hi,

Installing the assemble in to global cache

What is GAC
           The Global Assembly Cache is a machine-wide store used to hold assemblies that are intended to be shared by several applications on the machine. Each computer where the common language runtime (CLR) is installed has a global assembly cache.

How to load/ Add *.dll
I needs load my custom *.dll files developed in dotnet to be used in AX or application wide.

This can be achieved in multiple ways like.

1. Power-shell commands.
2. CMD prompt.
3. Developer CMD Prompt for Visual Studio.
and few more

This post is using power-shell.

1. Run windows powershell as administrator
2. Execute the below code with setting your path in first line
3. Mention your dll name in highlighted text with the extension as .dll
4. Remember to restart IIS

Set-location "D:\Dll"
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")            
$publish = New-Object System.EnterpriseServices.Internal.Publish            
$publish.GacInstall("D:\Dll\Ax2Json.dll")            
iisreset


Regards,

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...