Configure Web Services through Code in Business Central
Introduction: When coding an app that uses Webservices to connect to the integration solutions, it is generally recommended that there is a Setup, which we can configure, where the Webservices are created as well as deleted. Pre-requisites: Business Central VS Code with AL Language Extension Demonstration: Create a Setup Page having a boolean variable say ‘SetupExtension‘ and create a field having value as ‘SetupExtension Variable’.Output: On the OnOpenPage trigger add a code to Check if Web Services are already created and accordingly set the ‘SetupExtension‘ boolean field.Thus, whenever the Setup Page is Opened, the ‘SetupExtension‘ field is set as per the records in Web Services. On the OnQueryClosePage trigger write a code which will create the Web Services when ‘SetupExtension‘ boolean is set as ‘TRUE‘ and delete the Web Services if ‘SetupExtension‘ boolean is set as ‘FALSE‘.Output:i. When ‘SetupExtension‘ is set to ‘TRUE‘New Webservices are created.ii. When ‘SetupExtension‘ is set to ‘FALSE‘Web Services are deleted. Conclusion: Thus this way we can keep the existing app installed and enable/disable Web Services as needed. As compared to creating WebServices.xml file which directly creates the Web Services on installation of the app, I’ll be demonstrating it in my next blog.
Share Story :
Dynamics 365 Online Authentication with Client Credentials
Introduction: This blog explains how to Authenticate Dynamics 365 Online with Client Credentials. Steps: Steps in Azure 1. Register a App in Azure Active Directory. Login to portal.azure.com Navigate to Azure Active Directory –> App Registration –> New Application registration 2. Create App with Application type -> Web app/ API. Copy the Value of Application ID. 3. Give permission to Dynamics 365 Online. Go to Settings –> Required permissions –> Add –> Dynamics CRM Online –> Select Select the following permission. 4. Click on Grant Permissions –> Yes 5. Generating client secret key. Go to Settings –> Keys Create a new key and copy its value Steps in D365 Sales Create Application user. 1. Add a user from Portal.office.com 2. Go to settings -> security -> users. Change the view to Application Users. Add New user. 3. Enter User name and Application ID. Value of Application ID is obtained from MS Azure. 4. save 5. After Saving values of Application ID and Azure AD Object ID will come automatically. Steps in Azure 1. Add this user as Owner of the App which we created in MS Azure. Settings –> Owners –> Add owner 2. Obtain tenant id Azure Active Directory –> Properties –> Directory ID Making a Request using Postman POST URL: https://login.microsoftonline.com/<tenant id> /oauth2/token Header:Content-Type: application/json Body: Key Value client_id Application ID of the registered app in Azure resource https://trial.crm.dynamics.com (Dynamics 365 Online Insance URL Client_secret Key value from the registered app in Azure Grant_type client_credentials Below screen shows how to use above given keys to generate the access token. This token has expiration time. You need to refresh this token.
Share Story :
Sales Quote Dynamics 365 Business Central
Sales Quote use to record an offer to a customer to sell certain product on certain delivery and payment term. You can send quote to customer, negotiate with the customer, you can change and resend the sales quote as much as needed. When the customer accepts the quote, you convert the sales quote to a sales order or a sales Invoice in which you process the sale. In the Search box, enter Sales Quotes, and select the related link. Click on new to create new Sales quote. In the Customer No. field, enter the name of the customer Enter the Order date, Due Date, Requested Delivery date, Quote valid to date on Sales quote header. Select item or G/L Account in the type field in quote line. In the field, select the item number or GL number to be ordered. Enter the quantity you want to order in quantity field. Enter the price in in Unit Price Excl. Tax field When the sales quote lines are completed, choose the Send by Email action. If Customer Accept the quote, then on Process tab click on Make order to create Sales order from Sales quote or Make Invoice to create Sales Invoice. You will get below Infolog when Sales order will be created.
Share Story :
How to fetch a custom table created in Business Central into PowerApps using CDS and Odata.
Introduction: In this blog, I have introduced how to fetch a custom table from Microsoft Dynamics 365 Business Central into Microsoft PowerApps using Common Data Service(CDS) and OData. The table that was created in Business Central was fetched into a custom entity(MatchingLists) in CDS that allows me to create a local database in PowerApps for storing the entity data and OData that helps to fetch and integrate the data. Pre-requisites: Microsoft Dynamics 365 Business Central Microsoft PowerApps Steps: 1. Create a custom entity within Common Data Service(CDS) whose data you want to retrieve from Business Central. 2. Add the fields with their required data types. 3. Get Data from Business Central using OData Integration. 4. Go to web services in Business Central, add the custom page in the web services and use its OData V4 URL. 5.Enter the OData URL and the Organization credentials. 6. You will be shown the list of tables in each and every company. 7. Go to the table whose data you want to get into PowerApps, and select that table. 8. Next is to select the entity to be mapped with this table and field by field mapping of the same. 9. Refresh can be set manual or automatically, if automatic then select the time. 10. Create a list structure to dsiplay the table.
Share Story :
Scribe Error while integrating from Salesforce to Microsoft Dynamics NAV
Introduction: Recently, we encountered an error while integrating Sales Orders from Salesforce to Microsoft Dynamics NAV via Scribe displaying the following error message. Error Details: “The Sales Header Extension does not exist. Identification fields and values: Document Type=’Quote’, No=’ ‘ ” Reason for the error: Upon further debugging, we found that a field in the Target NAV environment was throwing the error when Scribe was trying to input data into it. Solution: The configuration of the field in the Target NAV environment needs to be changed so that it can populate data being integrated by Scribe. This will allow Scribe to integrate the record successfully!
Share Story :
How to change the no. of decimal points for a particular field in Dynamics 365 for Finance and Operation
Introduction: In Dynamics 365 for finance and operations the default decimal point is set up till 2 decimal place. To change the decimal point according to customers wish follow the following steps. Steps: 1. In the development environment run the Visual studio in administration mode. 2. In AOT find the EDT of the field and change the No of Decimals Property to 4-6 depending on the customers requirement. 3. Compile and build the solution. 4. The changes will be visible on Dynamics 365 finance and operations.
Share Story :
D365 PSA v3 – Resource Assignment and Booking
Introduction: There is no limit to what D365 PSA can do. However, it has undergone some significant upgrades. since PSA v3 is a major shift from its previous version, some processes have changed which has greatly enriched the experience of using D365 PSA V3. Let’s quickly look at how you can assign resources and then book them on the Project in PSA v3 using a perfect example. Project I have a sample Project called Grand Chocolatiers Inc. whose schedule looks like this (the WBS is now Schedule in PSA v3) – I will now Assign and Book a Resource to show you how this is done in PSA v3. Assigning Resources: Now, you don’t have any resources Assigned to the Project you just created, so let’s go to the Schedule in the Project and add a new Resource, say, Alicia Baker. I’ve added Alicia Baker without booking her. Coming to the Team and refreshing the grid, I’ll see Alicia being assigned the 12 Hours. Booking Resource: Now, I’ll come to the Resource Reconciliation section and see how I can book Alicia on the task. I’ll select the Previous Difference in order for me to see the distribution I want to book Alicia on. After I double click on the Hours denoted (1), I’ll see an expanded view (2). Now, if I only select the below highlighted days, I’ll be booking Alicia for those hours on the 3 selected days only. Then, I’ll click on Extend Booking. Once I confirm the 3 days that I see, the resource will be booked for that time. And I’ll see the updated Reconciliation View after I book the resource. Now, if you check the Team or the Schedule Board, you’ll be able to see that Alicia is now Booked for the selected duration. Conclusion: Microsoft Dynamics 365 for Project Service Automation enables companies to deliver projects more productively and profitably with higher client satisfaction and this is my personal experience. Today, being a project-based organization, we deliver end to end projects on time and this has helped us achieve an enhanced reputation as a service company. To check out more on the core functionalities and features, please see Kuldeep’s blog below: https://community.dynamics.com/365/projectserviceautomation/b/kuldeepsblog/archive/2018/10/16/reconciliation-view-amp-scheduling-a-resource-in-psa-v3
Share Story :
Track Emails by setting “Tracked To Dynamics 365” Category in Outlook
Introduction: Ever thought of how tracking in Dynamics 365 App for Outlook could be easier? Guess What? Using “Category Based Tracking” you can now easily track Mails, Appointments and Tasks by simply setting a category on them in Outlook. This feature is beneficial as you can select multiple emails, set the category, and the rest is all done for you. We can also provide the same permissions to a delegate and forget about tracking emails, which will be done by them on our behalf. In this article we will go through how to enable Category based Tracking in Outlook and assigning a delegate to do it for us. Pre – Requisites: Outlook D365 Customer Engagement Dynamics 365 App for Outlook Implementation: Step 1: First we must enable tracking using Categories in Dynamics 365. To do this we must import the “Organization Settings Editor” latest managed solution .zip file present at “https://github.com/seanmcne/OrgDbOrgSettings/releases” in our instance. Once done, open the solution and find “TrackCategorizedItems”. As shown below the default value set is “false” and the current value is not set. Click on Add > then an Edit button is shown where we change the value from “false” to “true” as shown, after which everyone in the organization will be able to see the category in their outlook. Step 2: On Opening Outlook after few minutes, in the categories we can see the “Tracked in Dynamics 365”. Step 3: Now if you want to track any particular mail to Dynamics 365, you can set the category of the mail to “Tracked To Dynamics 365”. When the server-side synchronization takes place, an activity record in created in CRM. In a similar way, we can Right Click on Appointments and Tasks in Outlook to track then in CRM. Step 4: To view tracking progress you can configure the Dynamics 365 App for Outlook which shows the status as Tracking Pending/ Not Tracked/Tracked. Step 5: In addition to this, we can also configure Delegate access so that you provide permission to another person who will performs these tasks on your behalf and track emails. Right click on the Inbox folder in Outlook > Permissions Click on “New” and add the person whom you want to provide the access and click Add. Modify Permission as Required. Note: If you want the delegate to set the “Tracked To Dynamics 365” category you will have to provide “Edit All” permission. Step 6: Once this is done, the user with whom the mailbox is shared must add the mailbox in their outlook: Right Click on Root Folder > Add Shared Folder > Add email of the user who has shared their mailbox. After which the Shared Mailbox will be visible. To enable the delegate to set categories of the shared folder you must click on “Share” on the top ribbon in you calendar and provide “Delegate Only” Access to the Delegate. The delegate will receive an email to accept and add the calendar, after which he/she will be able to set the categories on the shared folder mails. Note: After the owner of the folder shares the calendar make sure that the permissions that were previously assigned to the delegate are still intact else the categories sections will be disabled for the delegate. Step 7: To share the details of other folders under the root folder in Outlook, the process is the same, but you will to provide “Full Read Access” permission to the root folder and the desired custom permissions for the required folder. Conclusion: By setting this tracking category to mails on Outlook you can minimize the number of clicks and easily track activities in Dynamics CRM.
Share Story :
Correct Posted Purchase Invoices – Dynamics 365 Business central
Introduction : This functionality helpful to correct posted Purchase invoice if user make mistake or want to do any changes. You cannot correct posed purchase invoice which are partially or fully paid. Steps: In search bar enter Posted Purchase Invoice and chose the related link. Select and open Posted Purchase Invoice which you want to correct. Click on correct button on Posted Purchase Invoice form. Once you click on correct then you will get below pop up. Choose yes to continue. New Purchase Invoice with same information will be created. Make the changes whichever are required and click on post button to post purchase invoice. In Posted Purchase Invoices form, you can check new posted purchase invoice. Choose Show Corrective Credit Memoto view the posted purchase credit memo that voids the initial posted purchase invoice. Conclusion: This feature reduce the effort of users to create manual credit memo and again create new purchase invoice.
Share Story :
Actual vs Estimated hours myth
Introduction: All these years, I was calculating ‘Actuals’ as the billable hours on the project with the chargeable role. It was a myth that I continued to believe until I stumbled upon the solution that potentially demystifies this myth in PSA itself. Description: Below is how PSA helped to resolve this complex situation and this is how I cleared my understanding towards Actuals vs Estimated in PSA. In the project, I observed that the project was estimated to be a short project of 22 hours and the ‘Actuals’ were of 24 hours. Thereafter, I decided to dig deeper into it to understand the issue of these 2 additional hours, as this was not a big project and getting the additional 2 hours mistake would be very easy. To fix this, below are the actions that I followed: I accessed the Actuals from Project–> Project Name–> Actuals, as shown in the screen shot below. In the grid there, I sorted the “cost” aspect and calculated the number of hours which turned out to be 24. This was strange for me. Then I looked at the “Resource Role” column in the grid and found a 2-hour entry under the Non-Billable role. I pondered why these 2 hours Non-Billable hours are getting summed up in the actuals. But, if thought correctly, even the Non-Billable hours spent by the Resource is an Actual cost to the company. Conclusion: In this way, I could clear the air of confusion surrounding this and for my project budget calculations, I got another field created in the form named billable hours and calculated the sum of all the chargeable roles hours in that field. This now gave me all the three i. e Actuals, Estimated and billed hours in one go. Microsoft Dynamics 365 PSA is the next generation of cloud-based systems which provides an overview of business processes from Sales, Project Management, Customer Service and Fields Service.