AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.04.2009, 12:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,494 / 847 (79) +++++++
Регистрация: 28.10.2006
Microsoft Dynamics CRM Team Blog: Microsoft Dynamics CRM IFRAME Magic
Источник: http://blogs.msdn.com/crm/archive/20...ame-magic.aspx
==============

Microsoft Dynamics CRM allows you to access external web sites from within forms using IFRAMES (Inline Frames). You can configure the IFRAME to take information from the parent record. A pretty standard use of this is a Web tab on the Account form where the Account’s web site URL is passed to the IFRAME and the web site is available from a Web tab.



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;
}
}

Having done this, I thought it would be neat to add a tab to display a map of the Account’s location. I used the same process except I stuffed address fields into the IFRAME URL instead of the web site. The code I used is:
// Load Map URL
{
var AccountStreet = crmForm.all.address1_line1.DataValue;
var AccountCity = crmForm.all.address1_city.DataValue;
var AccountState = crmForm.all.address1_stateorprovince.DataValue;
var AccountZip = crmForm.all.address1_postalcode.DataValue;

var MapURL = "http://maps.msn.com/home.aspx?strt1=" + AccountStreet + "&city1="+ AccountCity+"&stnm1=" + AccountState + "&zipc1=" + AccountZip + "&cnty1=0";

if (MapURL != null)
   {
      crmForm.all.IFRAME_Map.src = MapURL;
   }
}

The code is really pretty simple as you can see. But the results are pretty neat.



And the Live Search Maps give you different views such as Bird’s Eye which I love:



There are lots of things you can do with IFRAMEs. Hopefully this will get your imagination going.

Cheers,

Larry Lentz



Источник: http://blogs.msdn.com/crm/archive/20...ame-magic.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Полезные ссылки по MS CRM. IgorF Dynamics CRM: Прочие вопросы 60 24.05.2013 16:19
Microsoft Dynamics CRM Team Blog: List Web Part for Microsoft Dynamics CRM 4.0 Deployment Scenarios Blog bot Dynamics CRM: Blogs 0 30.01.2009 22:05
Microsoft Dynamics CRM Team Blog: Microsoft Dynamics CRM 4.0 Bookshelf Blog bot Dynamics CRM: Blogs 1 22.01.2009 04:46
Microsoft Dynamics CRM Team Blog: Highlight: Available downloads for Microsoft Dynamics CRM Blog bot Dynamics CRM: Blogs 0 05.11.2008 22:05
Microsoft Dynamics CRM Team Blog: Top 14 Microsoft Dynamics CRM Sites and Downloads Blog bot Dynamics CRM: Blogs 0 14.07.2008 13:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 05:47.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.