Solved

Trouble with IFrame in MS CRM 4.0

Posted on 2010-08-19
8
661 Views
Last Modified: 2013-11-24
I have created an IFrame in a form. It shows the website (internal site) fine but when I type a username and password to login to the site it opens the site in a new window. How do I keep this from happening?
0
Comment
Question by:varesources
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 500 total points
ID: 33479402
Hi varesources,
add <base target="_self"/> in <head> element of your internal site.
Also in CRM's IFRAME : http://www.microsoftcrmhouston.com/customization/Javascript.UsingIframes.html
Check the first image, and uncheck restrict cross-frame scripting on your CRM form.
Regards,
Chinmay

0
 
LVL 1

Author Comment

by:varesources
ID: 33479543
Let me back up a little. Attached is an image that shows where the web address that I want to show up in the IFrame is.

I cannot add the code you provided to the website. It is a 3rd party site created for us. Because each application that is opened has a different web address I need the IFrame to use the address that is in the field.

Thanks!
Untitled-1.jpg
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 33479583
In that case I assume that site is coming from a third party server as well so most probably you will not be able to modify it via JavaScript.
Would you like to give it a shot though? Programatically add <base href="_self"/> tag?
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 1

Author Comment

by:varesources
ID: 33479632
The site is on a server here in our office. I physically cannot add it.

Here is a tutorial that I found through google. Maybe the information is bad.

To do this, one sets up a little code for the form On Load event that puts the Accounts web site URL into the IFRAME’s URL. It’s actually pretty simple. Here is the code (assumes you already know how to set up an IFRAME). IFRAME_WebSite is the name of the IFRAME and .src references the URL it uses.

// Load web site URL
{
var AccountURL = crmForm.all.websiteurl.DataValue;
if (AccountURL != null)
{
crmForm.all.IFRAME_WebSite.src = AccountURL;
}
}
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 33479652
Yes. I am aware of this code. But your problem is that the window opens up in a new window that is 'cause of Browser behavior. Your script is absolutely fine.
0
 
LVL 1

Author Comment

by:varesources
ID: 33479664
So without editing the html, I am stuck with opening in a new browser? Or is there a option in IE?
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 33479680
First of all as I suggested, try enabling the IFRAME setting, if you do that it might start working as expected, then second choice is to try with adding those base tag using JavaScript.
0
 
LVL 1

Author Comment

by:varesources
ID: 33480072
Correct me if I'm wrong but is WebSite.src the name of the IFrame in the form and AccountURL the name of the field that has the hyperlink?


// Load web site URL
{
var AccountURL = crmForm.all.websiteurl.DataValue;
if (AccountURL != null)
{
crmForm.all.IFRAME_WebSite.src = AccountURL;
}
}
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I showed you how to use console view (HERE (http://www.experts-exchange.com/articles/18379/Getting-Started-and-Using-the-Salesforce-com-Console.html)) -– but how do you set it up on the admin side of Salesforce? Note that you have to have Admin leve…
Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question