Solved

Trouble with IFrame in MS CRM 4.0

Posted on 2010-08-19
8
657 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
  • 4
  • 4
8 Comments
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Author Comment

by:varesources
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 27

Expert Comment

by:Chinmay Patel
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Note: You must have administrative privileges in order to create/edit Roles. Salesforce.com (http://www.salesforce.com/) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales and marke…
Read about achieving the basic levels of HRIS security in the workplace.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now