Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 16

Explore Business Central API through Postman using AAD Authentication

Posted On June 10, 2018 by Admin Posted in

Introduction: In this article, we will walk through steps on how to authenticate Business Central API using AAD Authentication in Postman Pre-Requisite: Business Central account Admin Access in Azure Portal Business Central API AAD authentication in Postman: In Postman, make a GET request to Business Central base API URL. Base URL: https://api.businesscentral.dynamics.com/v1.0/api/beta For using successful authentication, we need to add domain name or tenant ID Domain URL: https://api.businesscentral.dynamics.com/v1.0/myusersdomain.com/api/beta In Azure Active Directory, create a new Web API Type application registration. Sign On URL: https://www.getpostman.com/oauth2/callback Reply URL: https://www.getpostman.com/oauth2/callback Required Permission: Dynamics 365 (Note: If you are not able to find Dynamics 365 under the required permission, type Dynamics in Search bar on required permission section. Also, remember to Grant Permission to Application(requires Admin permission)) Under the Keys section, add new Key and Save. Copy the Generated Key as it will not be visible later. Now in Postman authorization tab, select OAuth 2.0 in Type. Provide following details Give a Token Name Call back URL: https://www.getpostman.com/oauth2/callback Auth URL: https://login.windows.net/myuserdomain.com/oauth2/authorize?resource=996def3d-b36c-4153-8607-a6fd3c01b89f Access Token URL: https://login.windows.net/myuserdomain.com/oauth2/token?resource=996def3d-b36c-4153-8607-a6fd3c01b89f Client ID: (Application ID of Azure Application) Client Secret Key: Paste the Key copied in step 2.d Grant Type: Authorization Code Untick Request Token locally Click Request Token and then Use Token. If the token is successfully generated, then you will see Authorization Code under Header section in Postman Now Click send.

Share Story :

Download Doucument Templates using Console App

Posted On June 8, 2018 by Admin Posted in Tagged in ,

Dynamic 365 development services has a team of experts, D365 architects and developers who works closely in every step in the business while closely understanding the requirements and designing the right solution for the business according to the needs as far as development is concerned the development team has a set of experts and developers that coordinate closely with the client and by using standard microsoft development technologies like visual studio and TFS online a robust and concrete development process is strategised. After developing the application it is internally tested according to the business needs and submitted to microsoft in order to clarify any issues. After that the application is listed on the App Source. Introduction: In this blog we will be demonstrate how to download word document templates from D365 Customer Engagement and then import them to another environment. Often there are requirements to move document templates from one environment to another. But currently adding document templates to solutions is not supported.  To overcome this we have created a console app which downloads the word document template. Implementation: Step 1: To download Document templates we have created a Console App and it requires the following details: Username Password Organization Service Endpoint Address GUID of the template word template to download The username and password are the basic details that we use to log in to https//:www.portal.office.com To get the Organization Service Endpoint Address, navigate to Settings > Customizations > Developer Resources and copy the address as shown in the image below. To get the GUID of the Template Navigate to Settings > Templates > Document templates and open the template you want to download and Click on the Pop Out option at the top right as shown below Then from the URL we can get the GUID of the record as shown Step 2:  The code to download the document template is shown below. It downloads the Word template and stores it in the location specified in the code. Remember to change this location to the location on your PC. Note: Replace all the required values in the code according to your organization details. Code: using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Client; using System; using System.Net; using System.ServiceModel.Description; using System.Text; using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Sdk.Query; using System.IO; namespace DownloadDocumentTemplates { public class DocumentTemplateDownload { static IOrganizationService _service = null; static OrganizationServiceProxy _proxy = null; static void Main(string[] args) { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; ConnectToCRM(“test@test.onmicrosoft.com”, “pass@1234”, “https://test.api.crm8.dynamics.com/XRMServices/2011/Organization.svc”); Guid userId = ((WhoAmIResponse)_service.Execute(new WhoAmIRequest())).UserId; if (userId != null) { Console.WriteLine(“Guid: ” + userId); //GUID of the document template String documentTemplateId = “094EEB2A-948C-E711-8112-70106FAA45E1”; GetDocumentTemplateContent(documentTemplateId); Console.ReadKey(); } } public static void ConnectToCRM(string _username, string _Password, string _OrgSOAPServiceUri) { try { ClientCredentials credentials = new ClientCredentials(); credentials.UserName.UserName = _username; credentials.UserName.Password = _Password; Uri serviceUri = new Uri(_OrgSOAPServiceUri); _proxy = new OrganizationServiceProxy(serviceUri, null, credentials, null); _proxy.EnableProxyTypes(); _service = (IOrganizationService)_proxy; } catch (Exception e) { Console.WriteLine(“Error while Connecting: ” + e.Message); } } public static void GetDocumentTemplateContent(string documentTemplateId) { EntityCollection doc = null; string content = null; string documentTemplateName = string.Empty; Encoding encoding = Encoding.UTF8; try { string fetchXML = @”<fetch version=’1.0′ output-format=’xml-platform’ mapping=’logical’ distinct=’false’> <entity name=’documenttemplate’> <attribute name=’content’ /> <attribute name=’documenttype’ /> <attribute name=’name’ /> <attribute name=’status’ /> <attribute name=’modifiedon’ /> <attribute name=’modifiedby’ /> <attribute name=’description’ /> <attribute name=’languagecode’ /> <attribute name=’associatedentitytypecode’ /> <order attribute=’documenttype’ descending=’false’ /> <order attribute=’name’ descending=’false’ /> <filter type=’and’> <condition attribute=’documenttemplateid’ operator=’eq’ uitype=’documenttemplate’ value='” + documentTemplateId + @”‘ /> </filter > </entity > </fetch > “; doc = _service.RetrieveMultiple(new FetchExpression(fetchXML)); if (doc != null) { if (doc.Entities.Count > 0) { content = doc[0].Attributes[“content”].ToString(); documentTemplateName = doc[0].Attributes[“name”].ToString(); } byte[] textAsBytes = Convert.FromBase64String(content); File.WriteAllBytes(@”C:\Users\test\Desktop\” + documentTemplateName + “.docx”, textAsBytes); } } catch (Exception) { throw; } } } } Step 3: When the code is run it downloads the document template on the your PC and the document template is named after the template in CRM. Conclusion: This is very helpful as it can be used in another environment by simply uploading the template. To import the word template we can navigate to Settings > Templates >Document Templates and then upload the template.

Share Story :

Booking resource on a Project Task or a Service Ticket in PSA

Successful and on time delivery of the project is the heart of the business for any professional services organization. Where services based projects are delivered. In order to ensure successful project delivery efficient tools and industries based practises needs to be implemented which is possible through Microsoft Dynamics 365 Project Service Automation. Project service automation is not very easy and not something that anyone can do. By using services automation project managers have been able to deliver projects of various sizes. For industries best practices and efficient project management the set up of PSA is very much required. Apart from the above aspects, project service automation also helps to manage time and budget of the billable projects as well as estimate the quote for the project. Introduction: PSA doesn’t have the capability OOB to do the allocation’s over the task. This means the resource booked are booked for a project and we cannot identify what task they are going to perform or are booked for. How to do? This is the real time scenario which a PM regularly comes up with while allocating. To this I have figured out a solution that can be worked upon. Write a Plugin to create a Resource Requirement record on creation of Project Task in the WBS. In schedule board expose Project task Entity to be visible. This will allow you to drag and drop the allocations on to the schedule board. But, the challenge here is that the Project Tasks doesn’t comes automatically in the above grid. It comes because of the Plugin written above to create a record of Resource Requirement. Ensure the plugin will take care of the updates made to the task and will update the Resource Requirement record simultaneously. In our organisation we also, allocate resource on cases that the clients have raised. For the same, we will have to write a workflow to create a task in WBS as soon as a case is created. On the creation of a task we already have a plugin written to create a Resource Requirement record. You can then allocate Resources on cases.

Share Story :

PSA – Import project lines from WBS Pre-Requisites

Introduction: I often face difficulties while trying to import project lines from WBS while using PSA (Project Service Automation). After lot of trouble shooting I try to doubt my configuration and see if they are good. What to do? To my surprise they all appear to be good. Following two things needs to be ensured to import project lines from WBS into Quote line details. 1. On Account used in the Quote, Product Price List and Project Price list is properly set. 2. The Cost Price list attached to the Organisational Unit used in the Quote should not have Organisational units for the resource roles added in the Cost Price List of the Organization unit.

Share Story :

Designing SSRS mobile reports using SQL Server Mobile Report Publisher

Posted On June 5, 2018 by Admin Posted in

Once you open the SSRS Mobile Report Publisher, you’ll see a blank layout grid and available visualization types as navigators, gauges, charts, maps, and data grids: To start designing your report, simply drag-and-drop the visualizations onto the layout grid: By default, you’re designing the “Master” layout, but you can also design layouts for Tablet and Phone: After switching to the Phone layout, you simply drag-and-drop the visualizations you have already created to optimize the layout for phones: You can also switch to Preview to see how your report looks in Master, Tablet, or Phone layout: Phone Layout: You can also switch to Preview to see how your report looks.

Share Story :

Store Coupon Code in Dynamics 365 Finance and Operations

Posted On May 25, 2018 by Admin Posted in Tagged in , ,

Introduction: In this blog we will see how to apply coupon discount on MPOS (Store) in Dynamics 365 for Finance and Operations. Steps: Step 1: Create  Bar code Mask Character for Coupon Code. Step 2: Create a New Barcode Mask set up. Keep the type as Coupon. Step 3: Create Bar Code for Coupon. Assign the Mask ID which was created in step 2. Step 4: Create Number Sequence for Coupon Code ID and Coupon Number. Step 5: Set the Retail Parameters for Coupon. Assign the Mask ID that was created. Step 6: Create a New Discount. Mention the discount Price, Products in Lines, Price group, Valid Discount Account and enable coupon code required. Step 7: Create a new Coupon. Mention the usage limit, usage type, associate discount to the coupon, Create a new line for coupon. Activate the Coupon. The Bar code will be generated. Make a note of the Bar code. This is how you set up Coupon Code on Stores in Dynamics 365 for Finance and Operations. Run Jobs and flow the discount to the store. To Redeem the Store Coupon Code: Step1: Scan the product that is under Discount. Step2: Scan the Barcode or Manually inter the Barcode. Step 3: The discount will be applied to the product along with the discount name Step4: Make Payment.

Share Story :

Filter records in gallery control based on value selected in other gallery control in PowerApps.

Introduction: This blog explains how to Filter records in gallery control based on value selected in other gallery control in PowerApps. Scenario: I am using Dynamics 365 Connection. I have data source named as Time Entry within that data source I have fields named as  Projects  and  Project task and data type of both fields is lookup. Values in Project Task is filtered based on value selected in Project field. Implementation Steps for Filtering Project Task based on Project: We must add Projects and Project Task data source in PowerApps because their data type is Lookup.(If you don’t know how to work with lookup fields Refer: https://www.cloudfronts.com/connect-dynamics-365-use-lookup-field-dynamics-crm-powerapps/ ) Add New screen name it Project Lookup and add gallery control on that screen. Select gallery control and set its item property to:SortByColumns(Search(Filter(Projects,statecode=0 ), TextSearchBox1_1.Text, “cf_name”), “cf_name” ) Add new Screen and name it Project Task Lookup and add gallery control on that screen. Select gallery control and set its item property to:SortByColumns(Search(Filter(‘Project Tasks’,     _cf_project_value =Gallery1.Selected.cf_projectid),TextSearchBox1_2.Text,”cf_name”),”cf_name”)here: Gallery1 is the name of gallery control on Project Lookup screen.

Share Story :

D365 V9 Alert Dialog

Posted On April 25, 2018 by Admin Posted in

Introduction: This blog explains how to show alerts in D365 V9. Details: We often get requirement to show alerts in D365 V9 Forms and can be achieved using below syntax. Xrm.Navigation.openAlertDialog(alertStrings,alertOptions).then(closeCallback,errorCallback); Example: 1. Alert with no callbacks. var alertStrings = { text: “successfully checkedin.” }; var alertOptions = { height: 120, width: 260 }; Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then( function () { } ); 2. Alert with callback method. var alertStrings = { confirmButtonLabel: “Yes”, text: “This is an alert.” }; var alertOptions = { height: 120, width: 260 }; Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then( function success(result) { console.log(“Alert dialog closed”); }, function (error) { concole.log(error.message); } ); Note: Xrm.Utility.alertDialog(message,onCloseCallback) is been deprecated.

Share Story :

How to Setup POP3/SMTP email configuration in Dynamics CRM

Introduction: This blog explains how to Setup POP3/SMTP email configuration in Dynamics CRM. Steps to be followed: Step 1:  Create new Email Server profile. a. Go to Settings –> Email Configuration –> Email Server Profile. b. Click on +New –> POP3/SMTP server. c. Fill Details in the form. Name: Gmail Incoming Server Location: pop.gmail.com Outgoing Server Location: smtp.gmail.com Now Go in Advanced Tab and Provide this Port values for Incoming and Outgoing Port. Incoming Port: 995  Outgoing Port: 587 d. Save. Step 2: Go to Email Configuration settings and then change Server Profile. Step 3:   a. Go to Mailboxes. b. Select the user for whom you want to activate. c. Add following details. Email Address: Enter your Gmail’s Email Address. In Credentials Allow to use Credentials for Email Processing and Provide your Gmail User Name and Password. d. Click on Approve Email e. Click on Test & Enable Mailbox. You may get following error. REASON: Due to hidden settings within Gmail that may be blocking connections from third party apps. SOLUTION:  a. Make sure you access these links while logged into the Gmail account, and make sure they’re turned on/enabled. https://www.google.com/settings/security/lesssecureapps https://accounts.google.com/DisplayUnlockCaptcha b. After enabling again go to mailbox and Click on Approve Email and Test & Enable Mailbox. c. Incoming and Outgoing Email Status is Success.

Share Story :

Call Management in D365 Field Service

Dynamic 365 for field service is an end-to-end solution to manage inventory, manage service orders, track assets as well as handling complex service agreements. It also boots your business by quickly identifying and dispatching resources in turn gaining the intelligence that is required to provide support to the business. Dynamic 365 field service management software helps your business to automate and improve scheduling in order to get the most out of your resources and by dispatching the right technicians. The software proactively detects, troubleshoots and resolves issues to enhance your service experience. This software is able to provide a dedicated self-service portal to its customers with proactive updates and tracking of technicians so that customers get positive impact on their business at every step Introduction: This blog provides a solution to requirement of Client for Call Management in D365 Field Service. Scenario: Most clients specify an requirement where Customers gives a Phone Call to Call Center or send email to Customer Care department and how to design this requirement in Field Service. Resolution: We need to provide solution to requirement as detailed below 1. Create a record of Case from Service Module by Customer Care Representative User as shown below 2. Client has first level of Support team who provide phone support and provide resolution to Customer, then can continue using OOB BPF to Resolve the Case. 3. Other Scenario is Client First Level Support Team is not able to resolve the issue and needs to create an Work Order for Case then User needs to below steps. Set Incident Type on Case and save record, otherwise this will restrict User from Creating Work Order by OOB Validation as shown below. Click button on ribbon with “Convert to Work Order” this creates an Work Order populating all data from Case to Work Order. Note: By Creating Case record below are advantages: First level Support team can review KB articles to resolve the Case. Origin type of record is saved like Phone Call , Email , Web etc. OOB feature to convert Case to Work Order. Conclusion: This blog explains how Phone Calls and email from Customer can be recorded in system and on need basis we can create Work Order from Case record by using OOB feature.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange