Tag Archives: D3FOE
Fetch Hierarchical data for Product Category in Dynamics 365 Operations
For today’s modern day business that needs customer satisfaction, scalability and digital intelligence, dynamics 365 finance and operations is a complete ERP solution and is one of the most trusted software in the world without any doubt. This ERP solution helps you to innovate your products and processes so that client’s expectations can be met on time and your business can survive well in the cut-throat competition. It also gives visibility to your business across customer sales and service, marketing system and connected distribution. It simplifies production floor management, speeds up product introduction and offers flexibility in delivery alternatives. When it comes to the impact on your finance, you can gain immediate financial insights, drive corporate strategy and growth and through efficient collection management, decrease debts considerably. Introduction: In this blog article, we will see how we can fetch hierarchical data using X++. How to fetch? We will take a scenario where we will pass a category hierarchy and will fetch all categories of that hierarchy and its child category. public class ProductCategoryHierarchy { EcoResCategory category; public void ParentCategory() { while select category where category.CategoryHierarchy == “Brands” { //code this.getChildrenCategory(category.RecId); } } /// <summary> /// get categories of child product /// </summary> public void getChildrenCategory(EcoResCategoryId ParentCategory) { while select category where category.ParentCategory == ParentCategory { //code this.getChildrenCategory(category.RecId); } } }
Purchase Order Workflow formatter error in D365 Finance and Operations
Introduction: In D365 Operations, when we create a workflow for Purchase Order we face a formatter error related to Time zone. This error is caused due to conflict as same time zone specified twice for a legal entity. First for the legal entity and second time for the address. In this blog, I will tell you how to resolve it. Solution: Go to Organization Administration -> Legal Entities In Address Tab, select More options -> Advanced In General Tab, Edit the Time zone to a different time zone.
Print Custom Size Report using Document Routing in D3FOE
Introduction: Recently I was working on Cheque Report. I created a custom size Cheque design and it was working fine while downloading it. Then the task was to print the cheque and test but the printout was off size. In this blog I will guide you how the custom size report prints using document routing agent in Dynamics 365 for Operations. Pre-requisites: Install Document Routing agent Configure Network Printers Adobe Reader Note: Click here to refer how to configure Document routing and network printer Steps: 1. Setup Printer Page Size You need to configure your printer to print custom size report. Go to Printer Paper size and select custom. A new dialog will ask for page size. Enter the Custom Paper size. Make this custom size as your default size. 2. Setup Adobe Reader Once you print the report from Operations with Print Destination as Printer, The Document Routing will take the command and send the document to Adobe Reader. Thus, it takes printing configurations of Adobe Reader and send it to Printer for printing. So, we need to setup the Adobe Reader as well. Please refer below screenshot for Adobe Reader Settings. Conclusion: After setting up Printer size and Adobe Reader with same orientation and page size you can print the Custom size report from D365 Operations directly to Printer with correct print layout.
Fetch Parameter name from ID for SSRS Report in D365 Operations
Introduction: I was stuck in an issue recently where I was working on SSRS report with multiple filter parameters. In multiple parameter, one parameter was Brand ID and in report I had to display the Brand name instead of its ID. In this blog article, we will see how we can get the name of brand as parameter using brand id in Dynamics 365 Operations. Steps: Override getFromDialog() Method getBrandName() method to fetch Brand name. parmBrandName() to set the value 1. Override getFromDialog() Method: In UI Builder class override getFromDialog() method. This method gets the value of Brand Id. /// <summary> /// Transfers data from the dialog into the data contract object. /// </summary> public void getFromDialog() { super(); RecId r; r = contract.parmEcoResCategoryId(); if (r) contract.parmBrandName(this.getBrandName(r)); } 2. getBrandName() method to fetch Brand name: This method is used to find Brand name and called from getFromDialog() method. The return value is passed as parameter to contract class. /// <summary> /// This method looks up name of the organization using the hierarchy relationship id. /// </summary> /// <param name = “hierarchyRelationshipId”>The hierarchy relationship id for the organization.</param> /// <returns>Name of the organization.</returns> public EcoResCategoryName getBrandName(RecId hierarchyRelationshipId) { EcoResCategory category; select firstonly Name from category where Category.RecId == hierarchyRelationshipId; return category.Name; } 3. parmBrandName() to set the value: This method gets or sets the value of Category Name. /// <summary> /// Gets or sets the value of the datacontract parameter Category Name. /// </summary> /// <param name=”_categoryName”> /// The new value of the datacontract parameter CategoryName; optional. /// </param> /// <returns> /// The current value of datacontract parameter CategoryName /// </returns> [ DataMemberAttribute(‘Retail Category Name’), SysOperationLabelAttribute(literalstr(“Brands”)), SysOperationHelpTextAttribute(literalstr(“Brands Category”)) ] public EcoResCategoryName parmBrandName(EcoResCategoryName _categoryName = categoryName) { categoryName = _categoryName; return categoryName; } Conclusion: This blog showed how we can fetch the parameter value from another parameter in SSRS report using filter parameters with Contract and UIBuilder class in D365 Operations.
Configure Network Printers for Print Management in D3FOE
Introduction: I faced an issue recently where I was trying to print a report directly to printer but Print Management Settings didn’t show any Printers option. In AX 2012 we had to perform setup in AX 2012 Server Configuration to print documents or report to connected printers. In Dynamics 365 for Finance and Operations, Enterprise Edition you need to install and setup Document Routing Agent in your system and activate Network Printers in D3FOE for printing. Steps: Install Document Routing Agent. Setup Printers in Document Routing Agent. Manage Network Printers in D3FOE. 1. Install Document Routing Agent. Go to Organization Administrator -> Setup -> Network Printers In Action Pane, Go to Application -> Download document routing agent installer Install downloaded setup file ‘DocumentRoutingAgentSetup’. 2. Setup Printers in Document Routing Agent. Go to Settings and enter details. Click OK. Application Id – Unique Appication Id. It is filled automatically. Dynamics 365 URL – URL of D3FOE Azure AD Tenant – Domain name of Azure Active Directory Run as Windows Service – This will configure agent as a windows service. If you want to print custom size reports then agent should be desktop app as it sends report to Printers with help of Adobe Reader instead of sending it to Target folder. Agent as service will send it to Target folder. Sign In with your logic credentials. Go to Printers. You can see the installed Printers on your device. Select the Printers you want to enable for printing in Operations. 3. Manage Network Printers in D3FOE. Go to Organization Administrator -> Setup -> Network Printers. You will see the list of Printers enabled on Document Routing Agent. Enable the printers by setting Yes for Active field. Conclusion: Once the setup is completed you can use the Network Printers from Print Destination – Printers option. Agent once installed on one machine and enabled as Network Printers can be used by anyone using the D365 Operations.
Set SSRS Report Parameter to allow null values in D365 Operations
Introduction: Reports are used to see summary of data. We also set parameter to filter data but at times we don’t want to filter using a parameter and keep it as blank. By default, parameter values are always mandatory in D365 Finance and Operations, Enterprise Edition. In this blog article, we will see how we set property to allow null values to a parameter in SSRS Report. Steps: Go to Report -> Parameters. Select the Parameter which you don’t want to be mandatory. Go to Properties -> Nullable. Set the value to True. This will allow you to pass null value. This is how you can make the report parameter as optional.