Showing posts with label cloudhosted. Show all posts
Showing posts with label cloudhosted. Show all posts

Saturday, April 11, 2020

Message API - Message::AddAction() in D365FO Version 10.0.10 PU34 | New Feature

Introduction: 
From the version 10.0.10 Platform update 34, Microsoft has added a new feature Message::AddAction() which is shown in the message bar. 

Details: 
Message API associated with display or action menu items, which is visualized as a hyperlink/link button. 

It is linked with a single record at a time, called single action. 

In below taken example, we will show sales order is navigated to the form SalesTable from the message bar. 

For testing it, we'll create the runnable class also know as job in AX 2012. 
class CFSMessageAPI
{
    public static void main(Args _args)
    {
        SalesTable            salesTable = SalesTable::find('SH-000121');
        MenuItemMessageAction actionData = new MenuItemMessageAction();

        actionData.MenuItemName(menuItemDisplayStr(SalesTable));
        actionData.TableName(tableStr(SalesTable));
        actionData.RecId(salesTable.RecId);
        str jsonData = FormJsonSerializer::serializeClass(actionData);

        int64 messageId = Message::AddAction(MessageSeverity::Informational, "Sales order details", salesTable.customerName(), MessageActionType::DisplayMenuItem, jsonData);
    }

}
Let's see how it works, 









In my case it's showing Mitchell. Click on the link. 



















After clicking on the action link, it is navigated to the sales order record form as shown in the above link. 

Hurray, How pretty feature is released !!!

Conclusion:
In above example, we have seen how Message API is routed to the record. 

Thanks for reading !!!

Friday, April 10, 2020

Deploy SSRS reports through Windows Powershell in Dynamics 365 Finance and Operations

Introduction:
In this blog, we will see how to deploy SSRS reports in Microsoft Dynamics 365 Finance and Operations  

Solution: 

For on-prem environment, we will open Windows PowerShell in administrator mode and run the below scrip step by step.
cd C:\AOSService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\

.\DeployAllReportsToSsrs.ps1

For online Cloudhosted/Dev environment, we will run below mentioned script
cd k:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\

.\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "k:\AosService\PackagesLocalDirectory"


It appears as





















When deploying reports are completed, It looks like






















Thanks for reading !!!