Category Archives: D365 Finance and Operations
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); } } }
Share Story :
Creating Entity Store in Dynamics 365 For Finance and Operations
Introduction: In this blog article, we will learn how to create entity Store in Dynamics 365 For Finance and Operations. Steps: 1. Add new Items 2. Under Dynamics 365 items –> Analytics –>Aggregate Measure. 3. Assign a table to the aggregate measure. 4. Add Measures to the aggregate Measure . Mention the field and Set appropriate properties of the measure. 5. Create a new dimension. 6. Assign a table or view to your Dimension. 7. Now from the solution explorer drag the newly created dimension to the aggregate measurement. The aggregate dimension will have system generated dimensions already present by default. Select the dimensional field and make appropriate relations. Save the Project. Clean and rebuild the project. Synchronize the database . This entity store will be available under entity store in Dynamics 365 for Finance and Operations.
Share Story :
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.
Share Story :
Free Text Invoice Dynamics 365 for Finance & Operations
Introduction: Free text invoice is useful to book sales without creating Sales order. It is used to sell a quantity of services and goods which are not inventory item. User cannot select Item in Free Text Invoice. It contains order lines that include ledger accounts, descriptions, and a sales amount. Steps: Below are the steps to create Free Text Invoice Click Accounts receivable> Invoices > All free text invoices. On Action Pane, Click new button to create new Free text invoice. On header, select the customer account, Invoice date, currency. Other fields are non-mandatory fields. In the Invoice lines grid, enter a description, select the main account, Sales tax and enter the quantity and unit price for the invoice line. On the Line details FastTab, enter any additional information. Click on Total for check the total amount of invoice. After filling all the data, click on Post button to Post the Invoice. To check Posted Free text invoice, click on Invoice journal button. To check the ledger entry, click on view accounting button.
Share Story :
Deployment of Power BI reports to Sandbox and Production
Introduction: Deployment of Power BI to Dynamics 365 for Finance and Operations is done by Embedded Power BI in Dynamics 365 for Finance and Operations. Configurations of Power BI in operations: Configure your LCS project within Dynamics 365 for Operations Navigate to System Administration –> System Parameters –>Go to Help Tab Here you will be asked to Connect to Life Cycle services. This operation is mandatory, it enables Dynamics 365 for Operations to established a trusted connection to LCS using your user credentials. Click on “Click here to connect to Lifecycle Services” On successful connection, you will be able to choose a set of LCS projects from the drop down menu. Select the LCS project Enable Power BI: Register Dynamics 365 for Operations deployment as an web app. 1. Login to you Power BI account 2. There are some fields we need to fill in: AppName (e.g. “D365PBI”) AppType (Server-side Web app) Redirect URI (this will be your instance URL with “oauth” at the end. E.g https://D3651611aos.cloudax.dynamics.com/oauth) Home Page URL (This will be your instance URL. E.g https://D3651611aos.cloudax.dynamics.com/) 3. Choose APIs to access 4. Then hit “Register App”. This will generate a Client ID and a Client Secret which we are going to input inside D365. 5. Keep this window open, we need to copy paste the keys into D365. Deploy Power BI Files: Navigate to System Administrator –>Deploy Power BI Files .Click on Deploy Power BI Files Here you will be asked to Authorize Power BI, Click on Authorize Power BI. Click on Deploy Power BI Files
Share Story :
How to issue and redeem Gift Card in Dynamics 365 For Finance and Operations
Introduction: In this blog we shall see how to Issue and redeem Gift Card in Dynamics 365 for Finance and Operations. Issue Gift Card: On POS go to Sales. Go to Action and select Gift Card. Click on Issue Gift Card. Enter the Gift Card Number. Enter the Amount for gift Card. Select any Tender to pay. You Can check the details of the Gift card under Gift card in Dynamics 365 FOE. Redeem Gift Card: On the Transaction Screen select the Products. To redeem the gift card select on Pay gift card. Enter the Gift card number. You can check the balance by clicking on check balance. Proceed to pay. You can manually enter the amount and remaining due can be paid by other mode of payment. You can check the details of the gift card under gift card in Dynamics 365 FOE.
Share Story :
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.
Share Story :
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.
Share Story :
Commands to Create .bacpac file from Azure SQL to SQL Server
Introduction: This topic explains how to export a Microsoft Dynamics 365 for Finance and Operations, Enterprise edition database from an environment that is based on Microsoft Azure. Steps: 1. Create a duplicate of the source database. <“CREATE DATABASE MyNewCopy AS COPY OF axdb_mySourceDatabaseToCopy”> To monitor the progress of the copy operation, run the following query against the MASTER database in the same instance. 2. Run the Sql Server script to Prepare the database. –Prepare a database in SQL Azure for export to SQL Server. –Disable change tracking on tables where it is enabled. declare @SQL varchar(1000) set quoted_identifier off declare changeTrackingCursor CURSOR for select ‘ALTER TABLE ‘ + t.name + ‘ DISABLE CHANGE_TRACKING’ from sys.change_tracking_tables c, sys.tables t where t.object_id = c.object_id OPEN changeTrackingCursor FETCH changeTrackingCursor into @SQL WHILE @@Fetch_Status = 0 BEGIN exec(@SQL) FETCH changeTrackingCursor into @SQL END CLOSE changeTrackingCursor DEALLOCATE changeTrackingCursor –Disable change tracking on the database itself. ALTER DATABASE — SET THE NAME OF YOUR DATABASE BELOW MyNewCopy set CHANGE_TRACKING = OFF –Remove the database level users from the database –these will be recreated after importing in SQL Server. declare @userSQL varchar(1000) set quoted_identifier off declare userCursor CURSOR for select ‘DROP USER ‘ + name from sys.sysusers where issqlrole = 0 and hasdbaccess = 1 and name <> ‘dbo’ OPEN userCursor FETCH userCursor into @userSQL WHILE @@Fetch_Status = 0 BEGIN exec(@userSQL) FETCH userCursor into @userSQL END CLOSE userCursor DEALLOCATE userCursor –Delete the SYSSQLRESOURCESTATSVIEW view as it has an Azure-specific definition in it. –We will run db synch later to recreate the correct view for SQL Server. if(1=(select 1 from sys.views where name = ‘SYSSQLRESOURCESTATSVIEW’)) DROP VIEW SYSSQLRESOURCESTATSVIEW –Next, set system parameters ready for being a SQL Server Database. update sysglobalconfiguration set value = ‘SQLSERVER’ where name = ‘BACKENDDB’ update sysglobalconfiguration set value = 0 where name = ‘TEMPTABLEINAXDB’ –Clean up the batch server configuration, server sessions, and printers from the previous environment. TRUNCATE TABLE SYSSERVERCONFIG TRUNCATE TABLE SYSSERVERSESSIONS TRUNCATE TABLE SYSCORPNETPRINTERS –Remove records which could lead to accidentally sending an email externally. UPDATE SysEmailParameters SET SMTPRELAYSERVERNAME = ” GO UPDATE LogisticsElectronicAddress SET LOCATOR = ” WHERE Locator LIKE ‘%@%’ GO TRUNCATE TABLE PrintMgmtSettings TRUNCATE TABLE PrintMgmtDocInstance –Set any waiting, executing, ready, or canceling batches to withhold. UPDATE BatchJob SET STATUS = 0 WHERE STATUS IN (1,2,5,7) GO 3. Export the database from Azure SQL cd C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin SqlPackage.exe /a:export /ssn:.database.windows.net /sdn:MyNewCopy /tf:D:\Exportedbacpac\my.bacpac /p:CommandTimeout=1200 /p:VerifyFullTextDocumentTypesSupported=false /sp:EG=ajgU8!Fx=gY /su:sqladmin Where : ssn (source server name) – The name of the Azure SQL Database server to export from. sdn (source database name) – The name of the database to export. tf (target file) – The path and name of the file to export to. sp (source password) – The SQL password for the source SQL Server. su (source user) – The SQL user name for the source SQL Server. We recommend that you use the sqladmin
Share Story :
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.