Setting up Portal Trial in Dynamics 365

Create your dynamics 365 trial as a first step (if not already created)

https://signup.microsoft.com/Signup?OfferId=bd569279-37f5-4f5c-99d0-425873bb9a4b&dl=DYN365_ENTERPRISE_PLAN1&Culture=en-us&Country=us&ali=1

Once trial is set up successfully, open the admin center for Dynamics 365 and select Applications and click on Manage to configure the portal.

Provide details for the portal

Click on Accept

Grant Permission to the Portal

We’d get the below message

After some time

Clicking on here takes us to the manage your solutions page

Once configured we’d see the following area\groups\sub groups added to site map specific to portals

Portal : 

myportal

 

Hope it helps..

“getRequiredLevel is not a function” error while creating a new contact record in Dynamics 365.

We were getting the strange getRequiredLevel is not a function error while creating a new record (in New Form Rendering)

After debugging, we figured out that it was failing for the following field “mapcontrollink”.

We commented out the entire section and imported it back (unsupported). This fixed the issue.

Strangely enough we couldn’t find that field in the Vanilla version, in our case it is the upgraded environment so that could be reason of having that extra field.

Hope it helps..

Using MediaWiki API for Showing content of Wikipedia page inside Dynamics 365 form

Hi,

Recently we had a requirement to show content of Wikipedia page and display it inside CRM in one of the entities form.

For this purpose, we can make use of “MediaWiki web service API.”

https://www.mediawiki.org/wiki/API:Main_page

To create the query, we can use the below tool

https://en.wikipedia.org/wiki/Special%3aApiSandbox

The html source code


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript">

function SetWikiContent() {

// get country name from crm form
if (Xrm.Page.getAttribute("new_name") != null) {

var title = Xrm.Page.getAttribute("new_name").getValue();

// set the url
var url = "https://en.wikipedia.org/w/api.php?format=json&action=parse&page=" + title + "&prop=text&section=0&callback=?";

$.getJSON(url, function (data) {
for (text in data.parse.text) {
var text = data.parse.text[text].split("
");
var pText = "";

for (p in text) {
//Remove html comment
text[p] = text[p].split("<!--");
if (text[p].length > 1) {
text[p][0] = text[p][0].split(/\r\n|\r|\n/);
text[p][0] = text[p][0][0];
text[p][0] += "
 ";
}
text[p] = text[p][0];

//Construct a string from paragraphs
if (text[p].indexOf("
") == text[p].length - 5) {
var htmlStrip = text[p].replace(/<(?:.|\n)*?>/gm, '') //Remove HTML
var splitNewline = htmlStrip.split(/\r\n|\r|\n/); //Split on newlines
for (newline in splitNewline) {
if (splitNewline[newline].substring(0, 11) != "Cite error:") {
pText += splitNewline[newline];
pText += "\n";
}
}
}
}
pText = pText.substring(0, pText.length - 2); //Remove extra newline
pText = pText.replace(/\[\d+\]/g, ""); //Remove reference tags (e.x. [1], [4], etc)

Xrm.Page.getAttribute('new_wikiinfo').setValue(pText);
}
});
}
}

</script>
</head>
<body onload="SetWikiContent();">
</body>
</html>

The helpful article

http://stackoverflow.com/questions/8555320/is-there-a-clean-wikipedia-api-just-for-retrieve-content-summary

Hope it helps..

Simple Bing Map HTML Web Resource to show Country location in Dynamics 365

Just sharing a HTML Web resource code to show Country location inside the map using name of the country.

Source Code: –


<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>My Bing Map</title>
<script charset="UTF-8" type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&s=1"></script>
<script type="text/javascript">
var map = null;

// get the bing map key https://msdn.microsoft.com/en-us/library/ff428642.aspx
var credentials = "AvYH87t36Tv3ybyYagU9HUZKjsrWO2Hcup3nu1fmNhpenHKO_xxxxx";

function GetMap() {

// countryName - name of the country from the CRM's form
var countryName = parent.Xrm.Page.getAttribute("new_name").getValue();

// calling virtual earth api
var geocodeRequest = "https://dev.virtualearth.net/REST/v1/Locations?countryRegion=" + countryName + "&key=" + credentials + "&jsonp=GeocodeCallback";

CallRestService(geocodeRequest);
}

function GeocodeCallback(result) {

if (result && result.resourceSets && result.resourceSets.length > 0 && result.resourceSets[0].resources && result.resourceSets[0].resources.length > 0) {

var coordinates = result.resourceSets[0].resources[0].point.coordinates;
var centerPoint = new Microsoft.Maps.Location(coordinates[0], coordinates[1]);

map = new Microsoft.Maps.Map(document.getElementById("mapDiv"),
{
credentials: credentials,
center: centerPoint,
mapTypeId: Microsoft.Maps.MapTypeId.road,
zoom: 5
});

var pushpin = new Microsoft.Maps.Pushpin(map.getCenter());
map.entities.push(pushpin);
}
}

function CallRestService(request) {
var script = document.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", request);
document.body.appendChild(script);
}
</script>
</head>
<body onload="GetMap();">
<div id='mapDiv' style="position: relative; width: 600px; height: 300px;"></div>
</body>
</html>

Check this helpful post as well

https://blogs.bing.com/maps/2015/03/05/accessing-the-bing-maps-rest-services-from-various-javascript-frameworks/

Hope it helps..

Deployment Manager – To create a new organization, the wizard must remove the current organization in Dynamics 365 message.

While creating a new organization using Deployment Manager we got the below message

It was because we had entered the Workgroup Product key which restricts it to only organization.

https://technet.microsoft.com/en-us/library/hh699677.aspx

Changing the product key to the server one, allowed creating the new organizations.

Hope it helps..

Not able to register Image for Plugin in Microsoft Dynamics 365 Developer Toolkit (Public Beta 1)

Hi,

While using Developer Toolkit for Dynamics 365 we got strange issue today, the Images were not getting registered for Plugins.

In fact, in the Create New Plugin dialog box we couldn’t see the option of adding images like previous version.

Previous version –

To get more details on the new toolkit refer the below article

http://butenko.pro/2016/11/developer-toolkit-dynamics-365-public-beta-1-whats-new/

Hope it helps..

Using World Map \ Bing Map in SSRS Report in Dynamics 365 (and earlier)

Hi,

Recently I was working on a SSRS Report that will show the countries in the world map (Country was a custom entity in our CRM)

To create such a report, drag the Map report item to the report designer.

OOB we do not have world map in the Map Gallery.

Download it from the following location

https://mapgallery.codeplex.com/releases

Copy the download RDL to the following location (in my case – SQL Server Data Tools for VS 2012)

Select the world map

Add a Bing Map layer

Select Basic map

Click Next and select appropriate value

Click on Finish.

Next inside report designer, right click Layer Data

And specify mapping between the spatial and analytical dataset (our custom dataset here which has 2 column in it, name of the country and A2.

Suppose we have following countries in our CRM

The final report with countries highlighted in colors.

Hope it helps..

Cannot update a report from a template if the report was not created from a template error while trying to import solution in Dynamics 365

While trying to import a managed solution to our test environment we got the below error

“Cannot update a report from a template if the report was not created from a template”. We got this error on one specific report.

Removing that particular report from the solution and trying the import again fixed the issue for us.

https://community.dynamics.com/crm/f/117/t/150777

Hope it helps..

SQL Timeout Issue while trying to Apply Solution Upgrade in Dynamics 365

Recently in our project we tried implementing solution upgrade to delete some of the components from the existing managed solution.

https://nishantrana.wordpress.com/2016/10/16/how-to-delete-components-from-managed-solution-in-dynamics-crm-2016-without-using-holding-solution/

However, we kept running into SQL time out issue and it didn’t work for us. Finally we raised product support ticket for it and eventually the product support team increased the SQLCommandTimeout to 5 minutes, which helped us to fix the issue.

Crm Exception: Message: Customer lookup [CustomerId] is invalid. Customer lookups can only be associated with 1 Account and 1 Contact error while importing solution in CRM

While trying to import solution to our test environment from our dev environment we got the below error

 “Crm Exception: Message: Customer lookup [CustomerId] is invalid. Customer lookups can only be associated with 1 Account and 1 Contact”

The way we got it fixed

  • Unzip the solution and open customizations.xml file
  • Remove all attributes with name “CustomerId” (Lead, Invoice, Opportunity entity)

g1

  • Find all entity relationships with ReferencingAttributeName equals CustomerId and add to EntityRelationship new attribute: unmodified=”1″

g2

  • Zip solution back and import it.

https://community.dynamics.com/crm/f/117/t/198818

Hope it helps..