SSRS Report Print management in D365

In order to add your customized report into Print management in D365, you needs to add an event handler to a delegate exposed by Microsoft.
Below is the example for Sales Invoice report

[SubscribesTo(classStr(PrintMgmtDocType), delegateStr(PrintMgmtDocType, getDefaultReportFormatDelegate))]
    public static void PrintMgmtDocType_getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
    {
        PrintMgmtReportFormatName formatName;
        #ISOCountryRegionCodes

        switch (_docType)
        {
            case PrintMgmtDocumentType::SalesOrderInvoice:
                // <GEEEE>
                if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoEE]))
                {
                    formatName =  ssrsReportStr(SalesInvoice, ReportEE);
                }
                // </GEEEE>
                // <GEELT>
                if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoLT]))
                {
                    formatName = ssrsReportStr(SalesInvoice, ReportLT);
                }
                // </GEELT>
                // <GEEHU>
                if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoHU]))
                {
                    formatName = ssrsReportStr(SalesInvoice, ReportHU);
                }
                // </GEEHU>
                // <GEELV>
                if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoLV]))
                {
                    formatName = ssrsReportStr(SalesInvoice, ReportLV);
                }
                // </GEELV>
                // <GEECZ>
                if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoCZ]))
                {
                    formatName = ssrsReportStr(SalesInvoice, ReportCZ);
                }
                // </GEECZ>
                // <GEEPL>
                if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoPL]))
                {
                    formatName = ssrsReportStr(SalesInvoice, ReportPL);
                }
                // </GEEPL>
                // <GTH>
                if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoTH]))
                {
                    formatName = ssrsReportStr(SalesInvoice, ReportTH);
                }
                // </GTH>
                // <GMY>
                if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoMY]))
                {
                    if (TaxParameters::find().GSTInvoiceFormat_MY == TaxGSTInvoiceFormat_MY::Full)
                    {
                        formatName = ssrsReportStr(SalesInvoice, ReportFull_MY);
                    }
                    else
                    {
                        formatName = ssrsReportStr(SalesInvoice, ReportSimplified_MY);
                    }
                }
                // </GMY>

                if (!formatName)
                {
                    formatName = ssrsReportStr(SalesInvoiceKAKA, Report);
                }

                _result.result(formatName);
        }
    }
Advertisements

DMF Excel Lookup Ax 2012

Some times we will not able to see or select the Excel sheets after selecting the source file, In that case we need to install one small patch given below:

Below patch needs to be installed in a machine were the DIXF is installed
Microsoft Access Database Engine 2010 Redistributable – 64 bit

https://www.microsoft.com/en-in/download/details.aspx?id=13255

D365 for Power Apps : POC

Requirement: Create and Edit the customer groups on a simple mobile Power app.

Prerequisite :
1) Mobile device with Internet
2) Login for Power App website  and D365 access.

Below steps to be followed to achieve the requirement :

Step 1: Login to Power App website with your user

Step 2: Select Dynamics 365 Phone Layout


capture11

Step 3 : In Connections tab click New Connection and select Dynamics 365 for Operations

Capture2

Step 4 : Click Create Button


Capture3

Step 5 : In Next screen It will show you all the data-set’s which you have access, select a appropriate data-set


Capture4

Step 6: Choose a table you want to use in your App and click Connect


Capture5

Step 7 : App screens are created and will be shown to you


Capture6

Step 8 : Click File and save as and then Name your app and slick save
You can save app to cloud as well as in your PC.


Capture7

Step 9 : You are done with your part of basic development in Power App web site.
Download the Power app from play store.

Step 10 : Login with the same credentials in you app, and you can see the App created in your  Power App website on your mobile PowerApps.

Sending the Customer Group records From D365 to Outlook: Logic Apps POC

Sending the Customer Group records (D365) to Outlook:

Step 1: Login to the Azure portal https://portal.azure.com with your credentials


Logicapp1

Step 2: Search Logic App, and click on it


 Logicapp2

Step 3: Click create button on the right corner below


Logicapp3

Step 4: Give Name and select an Existing resource or create a new resource group and click create


Logicapp4

Step 5: Select Blank logic app

Step 6: Perform the following steps :

                1 Create request

                2 Create Response

                3 Take Dynamics 365 operations and select get records


Logicapp5

                4 Sign in with your credentials

                5 Add instance and Entity Name

                6 In next step add office 365 outlook and sign in with your credentials

                7 Add To, Subject and Body (Give the field names that needs to be send via mail)

                8 Save the Logic App Designer


Logicapp6

                9 Click run, Once the Logic app runs successfully you will see all the green check marks


Logicapp7

 

Excel addin for D365 and Table browser for Chrome

Below steps will guide you to add D365 excel addin to your Excel

Step 1:

Browse the below link, and Click Add button

https://store.office.com/en-001/app.aspx?assetid=WA104379629&ui=en-US&rs=en-001&ad=US&appredirect=false

D365-1

Step 2:

Click on Open in Excel link

D365-2

Step 3:

Click on Open Office (desktop) as shown in below screenshot

D365-3

Step 4:

It will prompt you a window, as shown in below click yes

D365-4

Step 5:

Excel will be opened and asked for Enable, Click on Enable

D365-5

Step 6:

After clicking the Enable  a window will be opened on right side of excel to login to your D365 account,

D365-6

 

Step 6:

Paste the Same URL in server URL, click on Ok

Login to your D365 account and copy the URL till XXX.dynamics.com

D365-7

D365-8

Step 7:

It will ask you to confirm the changes, on clicking the Yes button it will be redirect you to sign in page

login with your account details which is using for D365

D365-9

 

 

 

 

How to add multiple report design under Print management in AX 2012

Below are the steps to be followed :

Step1. Create new Design for report under visual studio
Step2. Add code to method:
\Data Dictionary\Tables\PrintMgmtReportFormat\Methods\populate
Add code  before TTSCOMMIT:
addOther(PrintMgmtDocumentType::PurchaseOrderInvoice, ssrsReportStr(VendInvoiceDocument, MyReport), ssrsReportStr(VendInvoiceDocument, MyReport), #NoCountryRegionId);
Step 3. Choose you new format under:
AP -> setup -> form setup -> Print management -> Vendor invoice -> report format to VendInvoiceDocument.MyReport
Step 4.
New Report design can be executed from use Print management from Inquiry journal forms or during posting by selecting Print management destination.
Step 5. (Optional)
In case: the report still keep original design, add this code to class VendInvoiceDocumentController in method outputReport or Main:
//original menu item or your new menu item
if(args.menuItemName() == menuitemOutputStr(MyReportMenuItem))
{
formLetterReport.getCurrentPrintSetting().parmReportFormatName(ssrsReportStr( VendInvoiceDocument,MyReport));
}

Extensions In D365

Table Extensions :

The following table lists each table method and its events.

Published Table method Preceding event Succeeding event
validateWrite ValidatingWrite ValidatedWrite
validateDelete ValidatingDelete ValidatedDelete
validateField ValidatingField ValidatedField
validateFieldValue ValidatingFieldValue ValidatedFieldValue
modifiedField ModifyingField ModifiedField
modifiedFieldValue ModifyingFieldValue ModifiedFieldValue
Insert Inserting Inserted
Update Updating Updated
Delete Deleting Deleted
Initvalue InitializingRecord InitializedRecord
FinalDeleteValidation Executed when a delete operation is performed on a table object, before the operation is committed to the underlying database table N/A
FinalInsertValidation Executed when an insert operation is performed on a table object, before the operation is committed to the underlying database table N/A
FinalReadValidation Executed when a read operation is performed on a table object. N/A
FinalUpdateValidation  Executed when an update operation is performed on a table object, before the operation is committed to the underlying database table. N/A