Alfasith AX

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

Wednesday, October 24, 2018

Print HTML tags as run value in SSRS 2012 R3 / D365

Hi,

1. Select the text filed.
2. Click on the expression /  filed values (right click)
3. Select placeholder properties.
4. General tab  > Markup type > HTML as style.


Regards,

Tuesday, October 23, 2018

Deploy all the report in CMD for D365

Hi,

1. Run the powershell command prompt as administrator.
2. Paste the code for specific reports.
here my sample is PurchPurchaseOrder.Report

K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -Module ApplicationSuite -ReportName PurchPurchaeOrder.Report -PackageInstallLocation “K:\AosService\PackagesLocalDirectory”

3. To deploy all the reports.

K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation “K:\AosService\PackagesLocalDirectory”


Regards,

Monday, October 15, 2018

W3WP process attaching issues / debugger not enabled in D365


When ever you find w3wp process attaching issues or multiple times of w3wp process




1. Please check do local service w3c loading service is running.



2.  Please do check Load symbol for items in the solution.
D365 > Option


3. Restart the IIS.


Hope your issue will get resolved.

Conformation:


Thanks,


Sunday, October 14, 2018

Error: "The model element was saved with unparsable source code and cannot be used".

Hi,

This is error because of multiple times changes in the blocks of code. This is the error on building a recent changes which is not affecting by last changes.

Solution.

1. Take a complete old code in to Notepad and save the class and built the object.
2. Now replace this blocks of code with the buffer you have in clipboard.
3. You may save and build now.

Thanks,


Wednesday, June 20, 2018

Relation between ProjPostTransView and PurchOrder

Hi

Add the ProjTransId in to that view from ProjItemTrans.

display PurchId PurchId()
{
    PurchLine       PurchLine;
    ProjItemTransView   projItemTransView;
    InventTransOrigin       inventTransOrigin;
    ProjItemTrans           projItemTrans;
    ;
    if(this.ProjTransId)
    {
        select projItemTrans where projItemTrans.ProjTransId == this.ProjTransId;
        select PurchLine where PurchLine.ProjTransId == projItemTrans.ProjTransIdRef
                                        && PurchLine.ItemId == projItemTrans.ItemId;
        //select InventTransId from projItemTransView where projItemTransView.ProjTransId == this.ProjTransId
        //join inventTransOrigin where inventTransOrigin.InventTransId == projItemTransView.InventTransId;
        return PurchLine.PurchId;
    }
    else return "";
}

Thanks,

Monday, March 5, 2018

Joining a table in datasource without adding the table in to the form data source in AX 2012

Hi,

In my case I needs to add the purchTable as range but I dont want to add the table in that form datasource.

I added the below code in the PurchLine init().

public void init()
{
    Query                   query = new Query();
    QueryBuildDataSource    purchTableDS,purchLineDS;
    QueryBuildRange         activityNum,purchStatus;
    ProjBudgetLine          projBudgetLine;
    Query                   queryDB;
    QueryBuildDataSource        qbdsPurchLine;
    QueryBuildDataSource        qbdsPurchTable;
    super();
    projBudgetLine  =   element.args().record();
    qbdsPurchLine = this.query().dataSourceTable(tableNum(PurchLine));
    qbdsPurchLine.addRange(fieldnum(PurchLine, ActivityNumber)).value(queryvalue(projBudgetLine.ActivityNumber));

    qbdsPurchTable = qbdsPurchLine.addDataSource(tableNum(PurchTable));
    qbdsPurchTable.addLink(fieldNum(PurchTable, PurchId), fieldNum(PurchLine, PurchId));
    qbdsPurchTable.addRange(fieldnum(PurchTable, DocumentStatus)).value(queryValue(DocumentStatus::PurchaseOrder));

}

Get a table ID in SQL / table browser - D365

Hi select ID from SysTableIdView where  SysTableIdView .Name = 'CustTable' <URL>/?cmp=<CompanyID>&mi=sysTableBrowser...