Wednesday, January 2, 2019

D365FO Retail topology and basic configuration.

 
https://dyn365site.wordpress.com/2017/10/20/different-architecture-topology-for-dynamics-365-retail/

Thursday, December 20, 2018

call directly Ax specific form by clicking Ax icon without navigating in Ax module.

There is a requirement for one of client to open directly Job registration form by clicking Ax icon in desktop.
To Acheive these you have to do below changes.

1.Create a text file and enter the below script and save as JobRegistration.xml.


<?xml version="1.0" ?>
<AxaptaAutoRun
logfile="C:\\Users\\axtest1\\JobRegistrationLog.log"
logToScreen="false"
version="6.2"
exitWhenDone="false">
<Run type="displayMenuItem" name="JmgRegistrationClockInOut"/>
</AxaptaAutoRun>

2.Go to the Ax client configuration and create a new configuration and specify below

Command to run at the Application startup: AutoRun_C:\Users\axtest1\JobRegistration.xml

save the file as .axc in desktop.

Now you are done,click on the newly created .axc file and it will open directly Ax JmgRegistrationClockInOut form.


X++ job to delete data based on table prefix(cust/vend/kanban etc)

 In the below job we are deleting all data related to Kanban (prefix).you can use it for different prefix,just change the prefix in the code.

static void KanbanDelete(Args _args)
{
   
    int i =1;
    #AviFiles
    SysOperationProgress progress = new SysOperationProgress();
    Common common;
    #AOT
    Name name;
    NumberOf recordCount;
    TreeNode treeNode;
    SysDictTable sysDictTable;
    Connection      connection;
    Statement       statement;
    str             query;
    DataAreaId      currentDataArea;
    ;
    progress.setCaption("Loading…");
    progress.setAnimation(#AviUpdate);

    treeNode = TreeNode::findNode(#TablesPath);
    treeNode =  treeNode.AOTfirstChild();
    progress.setTotal(treeNode.AOTchildNodeCount());
    while (treeNode)
    {
        name = treeNode.AOTname();
        if(name like "kanban")
        {
            sysDictTable = SysDictTable::newTableId(treeNode.applObjectId());
            recordCount = sysDictTable.recordCount();
            if (recordCount)
            {
                connection = new Connection();
                statement = connection.createStatement();
                currentDataArea = curext();
                query = "delete from "+name;
                new SqlStatementExecutePermission(query).assert();
                statement.executeUpdate(query);
                CodeAccessPermission::revertAssert();
            }
        }
        progress.setText(strFmt("%1" ,name));
        progress.setCount(i, 1);
        i++;
        treeNode = treeNode.AOTnextSibling();
    }

}

Saturday, August 13, 2016

Test a WebService without any code and later consume in AX.

Hello Friends,

In our current Project we have a huge integration and get several web service call.
To validate the Web service before consuming through ax ,we can use different methodology.
1.SOAP UI :
Click the SOAP and Add the given WSDL  and press enter.
click on the operation and right side window will come.
enter the input request and run it.
right side you will get the response in the xml format.
 
2.WCF Test Client:
If VS is installed in your system ,then by default it will install WCF test client 
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
 
Add the WSDL under File>Add service and press enter.
Pass the input top panel and see the response in the below panel.

Once the outcomes is tested and validated,
you can the webService WSDL in Service Reference of a VS project.
Build the solution and deploy and Add to AOT.
It will reflect in AX under VS project area(Csharp projects)
Restart the client ,then only impact can be observe via code level.
Now you are ready to use the Web service through AX business logic.

Friday, February 13, 2015

Include multiple PO in the generate xml via AIF outbound.

Hi Friends,
In my current project, we have a scenario to generate multiple PO in a single xml file via batch process.

So initially decide to use send electronically feature in PO Confirmation form.If we use the logic in while loop for multiple PO number then it will create multiple xml file for each of the PO. So we need a solution to sum up all the xml into 1 xml.
We have introduced below piece of code to achieve the result. Multiple PO in single XML.
Multiple PO in Multiple XML.
Just add a while loop in below code.





Financial Dimension bug exist in DIXF functionality in standard Ax2012 R2 CU6.

Hi Friends,

while working in my current project,one of my functional person report issue on DIXF financial dimension.
Let me explain the issue:
Standard Ax2012 functionality:
Go the GL - General Journal
Create a journal.
Enter the Ledger account,based on the enter ledger account it will decide which configure account structure to be used.

cost-center-Purpose dimension structure value comes from below setup form.
(GL - Setup - Chart of accounts - configure account structure.









DIXF scenario:
We can use standard DIXF entity to import the ledger journal entity.(Opening Balance)







Based on the input ledger account it should validate that passing financial Dimension  with ledger is right or wrong.
But it is not happening.
financial dimension is static in DIXF import,not depends on passing ledger account.
it comes from default legal entity setup.
Coding issue & Solution:
\Classes\DMFDimensionHelper\generateDynamicDimension()
Red marked code always search first only,but it is wrong approach.
It should find based on the passed ledger account number.








Now if you try to import the CSV file via DIXF it will take right financial dimension.

Deploying all SSRS reports or single report in D365FSCM Using PowerShell.

  All reports can be deployed using following commands . 1. Open PowerShell run as administrator  2.Copy and paste below command and enter....