Month: March 2018
Enable Organization Insights Preview in Dynamics 365 CRM Online
Follow the below steps to enable Organization Insights preview feature in Dynamics CRM 365.
Step 1: Open Dynamics 365 CRM Online. Go to Settings -> Administration -> System Settings -> Previews.
Step 2: Select I have read and agree to the license terms.
Step 3: Select Organization Insights Preview (Enable Organization Insights Preview) as Yes and click on OK.
Step 4: Refresh the CRM Online Organization. Go to Dashboards and Click on the Organization Insights Dashboard.
Step 5: Below Dashboard will be displayed with different types of charts related to the Organization.
Hope you have learned a new feature today :):):)
How to get list of all Entities Display Name, Logical Name and Other info using SQL Query in MSCRM?
Use the below query to get all the list of Entities Display Name, Logical Name and Object Type Code.
SELECT
DISPLAYNAME.LABEL 'Display Name',
EV.NAME 'Logical Name',
ObjectTypeCode 'Object Type Code'
FROM
ENTITYVIEW EV INNER JOIN
LOCALIZEDLABELLOGICALVIEW DISPLAYNAME
ON (EV.ENTITYID = DISPLAYNAME.OBJECTID) AND (DISPLAYNAME.OBJECTCOLUMNNAME = 'LOCALIZEDNAME')
WHERE
LANGUAGEID = 1033 -- Add this if you want to filter records using language Id. For Example : LANGUAGEID 1033 is English
--AND ISCUSTOMENTITY = 1 -- Remove this if you want to show the system entities as well
--AND ISACTIVITY = 0 -- Add this if you want to filter out the activity entity
--AND EN.NAME NOT LIKE '%MSDYN%' -- Add this if you want to remove like post album, filter, etc
ORDER BY 1
Output:
Inspired from Miss Dynamics CRM blog
How to get the number of Tables and their records information in MSCRM On-premise?
Follow the below steps to get the volume of Tables,
Step 1: Open MSCRM SQL Database.
Step 2: Under Databases, select the required <CRM_Org_Name>_MSCRM database. Right click on it and click on Reports -> Standard Reports -> Disk Usage by Table.
Step 3: Disk Usage by Table report will be displayed as shown below.
Other way to do the same is,
Step 1: Select the required MSCRM database. Click on F7 or View -> Object Explorer Details.
Step 2: Object Explorer will be opened in a new window. Right click on the header to select the required data columns to be displayed as shown below.
Hope you got the results successfully :):):)
How to use Autocomplete feature in Dynamics 365?
Got a requirement to show the list of countries on an Contact form with Autocomplete feature in Dynamics 365.
Already i have a “Country” Master entity with the below main fields,
Click here to download the Country Master records.
On Contact Entity, used existing field “address1_country“.
Configured the below function on Onload of Contact Entity Main form,
Click here to download the same javascript code in txt format.
function AutoCompleteCountryRecords() { var countrySet = new Array(); // Retrieve all Countries records Xrm.WebApi.retrieveMultipleRecords("new_countries", "?$select=new_name,new_countrycode,new_capital").then( function success(result) { // Check whether result contains records or not if (result.entities.length > 0) { // Read all country records one by one for (var countryRecordsCount = 0; countryRecordsCount < result.entities.length; countryRecordsCount++) { // Push Country Code, Country Name and Country Capital to countrySet Array countrySet.push( new Array( result.entities[countryRecordsCount].new_countrycode, result.entities[countryRecordsCount].new_name, result.entities[countryRecordsCount].new_capital ) ); } } }, function (error) { // Show error message Xrm.Utility.alertDialog(error.message, null); }); // Key Press Funtion var keyPressFcn = function (ext) { try { // Get country value var countryInput = Xrm.Page.getControl("address1_country").getValue(); resultSet = { results: new Array(), commands: { // Unique Id id: "sp_commands", //To add the Link at the bottom of the auto complete search result label: "Learn more", action: function () { // Specify what you want to do when the user // clicks the "Learn More" link at the bottom // of the auto-completion list. // For example onclick of Learn More, just opening bing page window.open("https://www.bing.com/"); } } }; // Covert the entered text to lowercase var countryInputLowerCase = countryInput.toLowerCase(); // Read countrySet Array records one by one for (var countryCount = 0; countryCount < countrySet.length; countryCount++) { // Compare the entered text to the Country Name in countrySet Array element, if Yes add the country details to resultSet if (countryInputLowerCase === countrySet[countryCount][1].substring(0, countryInputLowerCase.length).toLowerCase()) { // Add the element to the resultSet resultSet.results.push( { id: countrySet[countryCount][0], fields: [countrySet[countryCount][1], countrySet[countryCount][0], countrySet[countryCount][2]] // Country Name, Country Code, Country Capital }); } // Check resultSet.results >=10 then break if (resultSet.results.length >= 10) break; } // Check resultSet.results has records then results in showAutoComplete otherwise hideAutoComplete if (resultSet.results.length > 0) { ext.getEventSource().showAutoComplete(resultSet); } else { ext.getEventSource().hideAutoComplete(); } } catch (e) { // Log the error in console console.log(e); } }; // Register addOnKeyPress event on address1_country field Xrm.Page.getControl("address1_country").addOnKeyPress(keyPressFcn); }
Output:
Open any New or Existing Contact record and start typing country name, below recommendations will be shown.
Hope you have learned a new feature today :):):)
Information about the upcoming Dynamics 365 Update 9.0.2
Click here to know more about upcoming Dynamics 365 Update 9.0.2.
How to enable Image for an Entity in Dynamics CRM?
I have created a custom entity named “Country” and want to set an image for it.
Follow the below steps to do the same.
Step 1: Open CRM. Goto Settings -> Customizations -> Customize the System -> Entity.
Step 2: Create an Image Data Type Field in the Country Entity as shown below.
Step 3: Open the Country Entity Main Form.
Step 4: Click on Form Properties and click on Display Tab.
Select the Show image in the form to opt the feature.
Step 5: Save and Publish the Entity.
Step 6: Open any existing record or create a new Country record. Click on the Default Image on the record to upload the Image.
Browse for the required file and click on OK.
Step 7: Image will be updated automatically and shown in the record.
Hope you have successfully uploaded the required image for your record.