Category Archives: Blog
To make the Business Central WebClient Accessible Externally
Introduction: In this blog , I will demonstrate the use of SSL certificates to help secure connections over a wide area network (WAN), connection from the Business Central Web Server to the Business Central Server. Business Central can support the following configurations: Chain trust, which specifies that each certificate must belong to a hierarchy of certificates that ends in a root authority at the top of the chain. Peer trust, which specifies that both self-issued certificates and certificates in a trusted chain are accepted. The implementation in this section describes the chain trust configuration, which is the more secure option. Pre-requisites: 1. Microsoft Dynamics 365 Business Central 2. SSL Certificates Demonstration: 1. Obtaining Certificates: You implement chain trust by obtaining X.509 service certificates from a trusted provider. These certificates and their root certification authority (CA) certificates must be installed in the certificates store on the computer that is running Microsoft Dynamics 365 Business Central Server. The CA certificate must also be installed in the certificate store on computers that are running the Business Central Web Server so that clients can validate the server. 2. Run the Certificates Snap-in for Microsoft Management Console and Install and Configure the Certificates. (NOTE: The Server Authentication and Client Authentication purposes must be enabled.) 3. Grant access to the Business Central Server service account: After you have installed the root CA and the service certificate on the computer running Business Central Server, you must grant access to the service account that is associated with the server so that the service account can access the service certificate’s private key. In the left pane of MMC, expand the Certificates (Local Computer) node, expand the Personal node, and then select the Certificates subfolder. In the right pane, right-click the certificate, select All Tasks, and then choose Manage Private Keys. In the Permissions dialog box for the certificate, choose Add. In the Select Users, Computers, Service Accounts, or Groups dialog box, enter the name of the dedicated domain user account that is associated with Business Central Server, and then choose the OK button. In the Full Control field, select Allow, and then choose the OK button. In the right pane, select the certificate. In the Certificate dialog box, choose the Details tab, and then select the Thumbprint field. Copy the value of Thumbprint field. For example, copy the hexadecimal characters to text editor, such as Notepad. Delete all spaces from the thumbprint string. If the thumbprint is c0 d0 f2 70 95 b0 3d 43 17 e2 19 84 10 24 32 8c ef 24 87 79 then change it to c0d0f27095b03d4317e219841024328cef248779. 4. Configure the Business Central Server instance: Enter the service certificate thumbprint and the credential type as ‘NavUserPassword’ and restart the server. 5. In the Windows Client Configuration file (ClientUserSetting.config ) and the Web Client Configuration file (NavSettings.json) make the credentials as ‘NavUserPassword’ and the DNSIdentity as the subject name of the certificate. The location of Windows Client Configuration file is Users\<username>\AppData\RoamingLocal\Microsoft\Dynamics 365 Business Central\. The location of Web Client Configuration file is C:\inetpub\wwwroot\BC130\navsettings.json. 6. Now go to IIS and set the bindings for https ( hostname will be the domain name of the server) and in SSL certificate select the CA Root certificate. 7. Now add the CA Root certificate in the external computer and enter the link for WebClient in the browser. (https://<Domain Name>/BC130) Conclusion: Thus, we have accessed the WebClient externally using the SSL.
Share Story :
Resolve “The Team member position has already been filled” error
Introduction: You might receive alert “The Team member position has already been filled” while submitting a request for an actual resource. Description: I was working on a project and we use PSA solution for resource management. Some Team Members was already added in project with “Generic Resource” and we wanted to replace resource with actual team member. But whenever I try to submit Resource request in PSA in “Project Team Member” I Receive alert message with “The Team member position has already been filled“. Solution: When you are adding a Project Team Member, are you choosing “Generic Resource” on Bookable Resource lookup for that team member? When you do this, you’re setting a Bookable Resource to team and thus can’t request for one anymore. When adding a Project Team Member, leave the Bookable Resource lookup unpopulated. This way a Bookable Resource is not assigned on the project team and you can submit a request against the created generic. When adding the Architect (Role), I have chosen Generic Demo Resource in the Bookable Resource lookup on the Quick Create. When adding the Consultant, I have left the Bookable Resource lookup unpopulated. Conclusion: So, this can be avoided if you are adding Resource from “Project Team member Associated view”.
Share Story :
Filter Error In Excel While Exporting SSRS Report From D365 CRM To Excel
Introduction: Once a User exports a report to Microsoft Excel from a Microsoft Dynamics CRM environment, they may want to further filter the report in Microsoft Excel. Issue: An issue I came across recently was that the report, when exported to Excel, would not allow me to filter in Excel for the first few columns, as shown in the screenshot below. On further testing, I found that this was due to the Title text box above the table. Solution: Once the side of the text box was extended to the very end of the report (as shown above), near the end of the page, Excel allowed the filters to be applied to all columns in the exported SSRS report. That solves it!
Share Story :
D365 Unified Interface: Enabling embedded legacy dialogs
Introduction: Quite simply put, some of the embedded dialogs like the Advanced Find, Merge Records, Assign & Edit record windows which are not by default visible on the Unified Client Like when you multi-select records, you can’t see the typical Merge, Edit buttons on the ribbon. Here’s how you enable them. System Settings: In your Web Application’s system settings, you have an option under general where you can enable these buttons in the Unified Interface. Now, you can retain those buttons in the Unified Interface as well. Have a great time exploring Unified Interface!
Share Story :
Activate Order button is not working on Order Entity in UCI
Introduction: This blog explains an alternative approach to Activate an Order in UCI. Scenario: We are using Prospect to Cash solution to integrate Sales Order from Sales to Operations (CRM To Operations). In UCI Activate Order button is not working which is used for Order Integration. In this blog we will see an alternative approach to achieve this. Pre-Requisites: D365 Sales Microsoft Flow Steps to be followed: Dynamics 365 – 1. Create Custom “Activate Order” button in UCI. 2. Add below JavaScript code which will trigger on Click of “Activate Order” Button. (This code will take the Order Guid and pass it to the http post request) Refer this blog to understand more about HTTP Post Request using Microsoft Flows: https://www.cloudfronts.com/http-post-requests-using-microsoft-flows/ // JavaScript source code CallMSFlowsToActivateOrder: function () { var entityGuid = Xrm.Page.data.entity.getId(); entityGuid = entityGuid.replace(“{“, “”).replace(“}”, “”); var data = JSON.stringify({ “OrderID”: entityGuid }); var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener(“readystatechange”, function () { if (this.readyState === 4) { console.log(this.responseText); } }); var xhr = new XMLHttpRequest(); xhr.open(“POST”, “URL Created From MS Flow”, true); xhr.setRequestHeader(‘Content-Type’, ‘application/json’); xhr.send(JSON.stringify({ “OrderID”: entityGuid })); } Microsoft Flow: 1. Create Flow from Blank. 2. Select the Http request is received trigger. 3. Add below in Request body JSON Schema 4. Add Get Record Trigger of Dynamics 365. In Item identifier pass the OrderId from the Dynamic Content. 5. List all related Sales Order Product of that Order. 6. Add apply to each control and update the value of Order is Active field. 7. Update the Processing state field of Order entity. Overall Flow:
Share Story :
Run Report in UCI Form for Web Browser
Introduction: This blog details steps for Run Report button in UCI Form via Web Browser in D365 Sales. Scenario: Client requires Run Report button in UCI Form for Order Entity in D365 Sales Steps: Below are steps to be performed for enabling Report button on Order Entity Create WebResource with below javascript function. Create a button on Form and call function “PrintSalesOrderDetails”. Conclusion: Hope this blog helps you to run report in UCI browser.
Share Story :
Featured Dashboard in Power BI
Introduction: In this article, we will learn how to set a default dashboard when you login to Power BI Service. Default Dashboard is termed as ‘Featured Dashboard’ in Power BI. Steps for configuring featured dashboard: Login to Power BI Service Open the Dashboard you need to display when you open Power BI Service. Click ‘Set as featured’ on the top navigation bar of your dashboard. A Pop-up window will appear for confirmation. Click on ‘Set as featured dashboard’ button. 1
Share Story :
Identify who imported the solution – Dynamics 365 CRM
Introduction: Sometime there is a need to know when and who imported the solution in to CRM. This will be done by XrmToolBox plugin called “Solution History”. Purpose of Solution History: The purpose of the tool is to view a historical list of solutions that have been imported. This provides sort of audit functionality for solutions, as the OOB solution view doesn’t really display how many times a solution has been imported, version number that was updated, error/warning messages that were encountered during solution import. Steps: Install Solution History plugin from Plugin Store in XrmToolBox. Open the plugin and connect to the environment. Select the time frame for the solution. The solutions will be displayed as below. Select the solution for which you want to check the details. Click on Load Solution History. The details will be shown as highlighted below. Other methods of knowing this are listed below: 1) Looking in to the database 2) Checking XML Hope this helps!!
Share Story :
[SOLVED] “Corrupted report PDF generated using JavaScript” in Dynamics 365 V9.0
Introduction We had developed a functionality for Dynamics CRM v8.2 on Quote Entity by adding a custom button and on clicking a button we run a report, capture its contents using JavaScript, convert it to a PDF and attach the PDF to an Email Record. Below shown is the code snippet quoteInvoice = { runReportToPrint: function () { debugger; var params = quoteInvoice.getReportingSession(); var newPth = Xrm.Page.context.getClientUrl() + “/Reserved.ReportViewerWebControl.axd?ReportSession=” + params[0] + “&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=” + params[1] + “&OpType=Export&FileName=public&ContentDisposition=OnlyHtmlInline&Format=PDF”; //Calling the below function converts the report to PDF format. quoteInvoice.convertResponseToPDF(newPth); }, getReportingSession: function () { var selectedIds = Xrm.Page.data.entity.getId(); selectedIds = selectedIds.replace(‘{‘, ”).replace(‘}’, ”); var strParameterXML = “<fetch distinct=’false’ mapping=’logical’ output-format=’xml-platform’ version=’1.0′><entity name= ‘quote’><all-attributes/><filter type=’and’><condition attribute=’quoteid’ value='” + selectedIds + “‘ operator=’eq’ /></filter></entity ></fetch >”; var reportGuid = “DAF05843-CA33-E711-811E-FC15B42827EC”; var reportName = “Quote Invoice.rdl”; var pth = Xrm.Page.context.getClientUrl() + “/CRMReports/rsviewer/QuirksReportViewer.aspx”; var retrieveEntityReq = new XMLHttpRequest(); retrieveEntityReq.open(“POST”, pth, false); retrieveEntityReq.setRequestHeader(“Accept”, “*/*”); retrieveEntityReq.setRequestHeader(“Content-Type”, “application/x-www-form-urlencoded”); retrieveEntityReq.send(“id=%7B” + reportGuid + “%7D&uniquename=” + Xrm.Page.context.getOrgUniqueName() + “&iscustomreport=true&reportnameonsrs=&reportName=” + reportName + “&isScheduledReport=false&p:quoteid=” + strParameterXML); var x = retrieveEntityReq.responseText.lastIndexOf(“ReportSession=”); var y = retrieveEntityReq.responseText.lastIndexOf(“ControlID=”); var ret = new Array(); ret[0] = retrieveEntityReq.responseText.substr(x + 14, 24); ret[1] = retrieveEntityReq.responseText.substr(x + 10, 32); return ret; } } The runReportToPrint() function is called when the custom button is clicked Issue and Error Details Once the environment was upgraded to V9.0 we were facing issues as the PDF that was generated was corrupted as show below. While debugging the code we got the following message. On further research we found that the URL has been changed and below shown is the new path that has to be used which works correctly on V9.0. var pth = Xrm.Page.context.getClientUrl() + “/CRMReports/rsviewer/ReportViewer.aspx”; Once this change was done we did not get any error and the PDF of the report that was generated opened correctly with all of its contents.