Dynamics 365 Archives - Page 51 of 81 - - Page 51

Category Archives: Dynamics 365

Reading more then 10K records in D3FOE OData API

Introduction: We all know Dynamics 365 Finance and Operations has limitation of 10K records to be fetched at a time using Data Entity. While reading records from D3FOE for CRUD operations in OData API you will face issue if you want to process more than 10K records at a time. You can resolve this issue by using query parameter ‘skip’ and ‘top’. Use the below syntax to query records while reading from D3FOE: DataServiceQuery<[EntityName]> EntityObject = context.[EntityName].AddQueryOption(“$skip”, 10000).AddQueryOption(“$top”, 10000); where, EntityName = Name of data entity from where you want to read records Skip = it will skip the number of records you specified from the fetched records Top = It will select the number of records specified after skipping the records Example: If there are 30K records in CustCustomers then above line will skip 10K records and then pick the next top 10K records. So records selected will be from 10001 to 20000. DataServiceQuery<CustCustomers> EntityObject= context.[CustCustomers].AddQueryOption(“$skip”, 10000).AddQueryOption(“$top”, 10000); You can also get the total count of records and then run a loop until max count of records and increment the skip with 10K on each loop and top with 10K. Using this you can read ‘n’ number of records.

Share Story :

Paging in D365 Customer Engagement v9.0

Posted On July 10, 2018 by Clinton D'Mello Posted in Tagged in

Introduction: The Xrm.retrieveMultipleRecords method is used to retrieve a collection of records in Dynamics 365 Customer Engagement . In this blog we will demonstrate how we can use paging and fetch more than 5000+ records. In CRM when we fetch records using code we only get the first 5000 records, in some cases there are more than 5k records that need to be fetched, we can achieve this using paging. In this blog for the demonstration purpose, we will fetch 3 records per page so that we can see how the paging functionality works in D365 v9.0 Implementation: Step 1: The syntax is as shown below: Xrm.WebApi.retrieveMultipleRecords(entityLogicalName, options, maxPageSize).then(successCallback, errorCallback); Here the in options parameter we specify the query. In our example we will be fetching all the accounts in the system. In the maxPageSize parameter we specify the number of records to be returned per page. By default the value is 5000. In this example we set the maxPageSize as 3 which will return 3 records per page. As the total number of records being fetched are more than 3, the nextLink attribute is retuned with the link to fetch the next set of records. The value of the nextLink attribute returned is already encoded. Before we pass the link to fetch the next set of records we have to make sure to only set the query in the options parameter. We also store all the values returned in a separate variable so that it can be used later. Step 2: The code is shown below. The allaccounts variable will store all the accounts fetched at the end as we keep on concatenating the received results. Code: var query = “?$select=name”; var allaccounts = null; var scripting = { retrieveMultipleContacts() { var url = Xrm.Page.context.getClientUrl() + “/api/data/v9.0/accounts”; Xrm.WebApi.retrieveMultipleRecords(“account”, query, 3).then( function success(result) { var resultRetrieved = result; allaccounts = resultRetrieved.entities.concat(allaccounts); if (result.nextLink != undefined) { console.log(“Next page link: ” + result.nextLink); query = result.nextLink; var splitValue = query.split(url); query = splitValue[1]; scripting.retrieveMultipleContacts(); } }, function (error) { console.log(error.message); } ); } } Step 3: To test this out we can simply trigger this code to run on the change of form fields and while debugging we can check the values returned and stored in the allaccounts variable. Conclusion: The new D365 v9.0 Xrm.WebApi.retrieveMultipleRecords method simplifies the whole process of fetching records using paging.

Share Story :

Set up Dynamics 365 connection in Microsoft Social Engagement

Introduction: This blog explains how to Set up Dynamics 365 connection in Microsoft Social Engagement. Steps to be followed: Go to settings Under connections tab go to Microsoft Dynamics 365. Click in + to create connection and then click on Accept. Select the connection type. You can click on CHECK INSTANCES it will load the instances. Or you can enter the URL of the instance in Dynamics 365 instance URL box. Finally give name to your connection. If you want to make this as your default connection. click ON the set as default option.       Save.Note:  You can only connect to those instances who are in same office 365 tenant. 

Share Story :

Voice of the Customer failed to install

Introduction: Many people face issues in installing Voice of Customer solution on v9 environment and trying repeatedly to install the solution but failed. Below is the error that usually people get. How to install? Installing Voice of Customer is an easy process. If you are facing some error, you might be doing something wrong. The steps on how you can install Voice of Customer solution are listed below. The Voice of the Customer for Dynamics 365 solution can be installed from Dynamics 365 Administration Center. It is compatible with Dynamics 365 version 8.2 and later. Sign in to your Dynamics 365 solution as administrator. Go to the Dynamics 365 Administration Center, and then select the Applications Select the application row titled Voice Of The Customer, and then select Manage. From the Dynamics 365 Instancedrop-down list, select the instance where you want to install the solution. Accept the license terms. Select Install. By following the above steps you can see the solution gets configured properly. Note: You must be a tenant administrator to install the solution. The list of instances only displays the organizations with Dynamics 365 version 8.2.

Share Story :

D365 PSA: Impact of Project Closure on Bookings

Introduction: Let’s look on a high-level of what Project Closure has impact on the Bookings on the Schedule Board. Now, while working in D365 PSA, I encountered that I needed to mark a Project as Completed even when I had some bookings in the future. This led me to notice its effect on the Bookings (Bookable Resource Bookings records) I’ve created which also span a little into the future. Project Booking for a Resource: Now, let’s see the below scenario, Brian is booked on Archer Pens Project according to the following 13 and 5 hours (8 hours) on 9th July 2018 10 hours on Monday, 10th July 2018 10 hours on Tuesday, 11th July 2018 5 hours on 12th July 2018 9th July 2018- 10th July 2018- 11th July 2018- 12th July 2018- Now, if I mark the Project as completed today i.e. 10th July 2018 and the End Date being tomorrow i.e. 11thJuly 2018. Let’s see what happens – I marked the Project as Completed (went past the Complete stage in the Business Process Flow) as seen below – Deletion of Bookings: Once I mark the Project as Completed, the Bookings for today, 10th July and all the future Bookings will be deleted. Only historic Bookings before today will remain in the system. If I check back, 10th July will have no Bookings 11th July will have no Bookings And 12th July too will have no Bookings anymore What remains is only for 9th July because it is before the date I closed the Project Note: I also tried to observe if today’s bookings have any end time before I actually Closed the Project. Meaning, a booking ending at 10 am and I Close the Project later at 12pm, it would still delete today’s Booking for the day. So, close Projects carefully if you feel you need to close them in advance, just in case.

Share Story :

Security role of user after Business Unit Change

Introduction: Have you ever faced simple issue of security role after changing the business unit? Yes, you will. You will not be able to identify which security role was assign to a user whose Business unit has been changed. Description: This is a simple thing but if we have not noted down the security role of a user, we will not be able to identify the previous security role a user, as all the security roles gets removed. Solution: If audit history for user is enabled. You can easily identify the user who has what security role. So, as you can see in the above screen shot what security role this user has been assigned. Conclusion: Hope this help, while changing BU so, this help to remember the user security role.

Share Story :

Calendar Rule Entity not supported in Power BI

Posted On July 4, 2018 by Admin Posted in

In Power BI, Dynamics 365 is connected using its Web API i.e [organization URI]/api/data/v9.0 Dynamics 365 Web API does not support GET Request for calendarrule entity; because of which Power BI cannot retrieve calendar rule entity details. You can verify by browsing to the URL: [organization URI]/api/data/v9.0/calendarrules Please refer to the screen capture below for the error details in browser. Also, you will not be able to load the calendar rule entity in Power BI. Below screen capture displays an error received in Power BI.

Share Story :

Xrm.Device.pickFile in D365 v9.0

Introduction: In this blog we will be showing an example to attach the uploaded files to notes using the Xrm.Device.pickFile function in unified Interface in D365 v9.0 Implementation: Step 1: In this example we will create a button on the Contacts entity and we write a JavaScript function to trigger on button click. In Ribbon Workbench after creating a button we create a command as shown below and add the command on the button. Step 2: On clicking on the Upload button a dialog box opens and we can select the file we want, this file will then be attached in the notes section of the particular record. The code is shown below. The name of the Note created, name of the attachment can be changed as required by modifying the code. Code: var crmCustomization = { PickFile: function () { Xrm.Device.pickFile().then( function (result) { var dataRecieved = result; var Content = dataRecieved[0].fileContent; var FileSize = dataRecieved[0].fileSize; var FileName = dataRecieved[0].fileName; var MimeType = dataRecieved[0].mimeType; var recordId = Xrm.Page.data.entity._entityId.guid; crmCustomization.UploadToNotes(FileName, MimeType, Content, recordId); }, function (error) { alert(error.message); }); }, UploadToNotes: function (FileName, MimeType, Content, recordId) { var note = Object(); note[“notetext”] = “New Attachment” note[“subject”] = “Uploaded File”; note[“filename”] = FileName; note[“mimetype”] = MimeType; note[“objectid_contact@odata.bind”] = “/contacts(” + recordId + “)”; note[“documentbody”] = Content; $.ajax({ type: “POST”, contentType: “application/json; charset=utf-8”, datatype: “json”, url: Xrm.Page.context.getClientUrl() + “/api/data/v9.0/annotations”, async: true, data: JSON.stringify(note), beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader(“Accept”, “application/json”); XMLHttpRequest.setRequestHeader(“OData-MaxVersion”, “4.0”); XMLHttpRequest.setRequestHeader(“OData-Version”, “4.0”); }, success: function (data, textStatus, XmlHttpRequest) { var result = data; alert(“File attached to Notes successfully”); }, error: function (XmlHttpRequest, textStatus, errorThrown) { Xrm.Utility.alertDialog(“Error: ” + textStatus + ” ” + errorThrown); } }); }, }; We can see after uploading the file  the note is created with the attachment as shown below

Share Story :

How to Configure Alert Configuration in Microsoft Social Engagement

Introduction: This blog explains how to Configure Alert Configuration in Microsoft Social Engagement. Steps to be followed: Go to Message Center Click on + to create alert configuration. Enter the following details: Name: Give name to your alert. Alert Type: select the type of alert  you want. Post alert/Trend alert Email recipients: Enter the email address of recipients to whom alert mail should go. Filters: Select filters to narrow the posts to the data set you want to work with. i.e. which posts will be received by recipients.   Add Search Topic: You can also filter based on the following criteria. Example filtering based on source and Language: After configuring click on SAVE.Post alert in mail:

Share Story :

Customizing the Booking card information on Scheduled Board – D365 PSA/Field Service

In order to help your organization manage complex service management track assets and inventory, identify and dispatch resources, and manage service order Microsoft has given D365 field service which is an end to end solution that turns out to be an integral part of your day to day business. It provides customers with proactive updates and self service portals that helps is tracking of technicians hence giving customers a smooth and positive experience at every step. Detecting troubleshooting and resolving issues has been made possible through Dynamic 365 field service due to which a technician is dispatched only when it is necessary. A real time guidance is provided in order to build customer trust and improve resolution time which empowers technicians with a 360 degree view of the customers. Introduction: Sometimes, stock Schedule Board doesn’t quite do justice by default to your bookings and how Dispatchers see this information today. Out-of-the-box information on a Bookable Resource Booking looks like this – What if you want to modify this information and show what’s relevant to Dispatchers? Modifying the Schedule Board: You can modify the details of what you need to see on the booking by modifying/configuring some details as shown below: First, this is how the default Booking Template looks like – Double-click on the board you want to make changes to (Or, navigate to Tab Settings). As in picture 1 above, double-click on Initial Public View to open the Tab Settings area, then look for Schedule Types section and look for Work Order / Project entity (depending on which entity’s Bookings you want to effect.) In the Booking Template section, write this sample code which will show different information other than what comes out-of-the-box. Sample Code: Customer:{msdyn_msdyn_workorder_bookableresourcebooking_WorkOrder.msdyn_account_msdyn_workorder_ServiceAccount.name} WO Name: {msdyn_msdyn_workorder_bookableresourcebooking_WorkOrder.msdyn_name} Type: {msdyn_msdyn_workorder_bookableresourcebooking_WorkOrder.msdyn_workordertype} 5. Once finished, click Apply. The Schedule Board will refresh and you’ll see the updated information as shown below: And very simple, you’ve modified the Booking Template without much hassle or complex coding.

Share Story :

SEARCH BLOGS:

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :