0
votes

What is the best/simplest way to embed an iframe on a form in Dynamics CRM 2013 for a system that is deployed in four environments? We have a developer crm version, test, user acceptance version and also the live version of the site.

An ASP.NET MVC website is being embedded in the frame and the url for this is different depending on which CRM site it relates to.

I am doing this by embedding a frame and selecting "pass record object-type code and unique identifiers as parameters" and allowing cross-site scripting for the MVC website.

The issue is that each crm site needs to have a different URL for the iframe because there are different versions for dev/test/uat/live of the MVC websites.

What is the simplest way to achieve this?

1

1 Answers

0
votes

The simplest way is to create an HTML web resource with some javascript code inside to handle the redirect.

for example

<html>
<head>
<script>
var testlink = "http://testsite/mcv";
var devlink = "http://devsite/mcv";
if (mycondition == test) { // put your condition here based on the server url or whatever
   document.location.href = testlink;
}else {
   document.location.href = devlink;
}
</script>
</head><body></body></html>