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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.05.2009, 18:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
mscrm4ever: CRM 4.0 Finding Entity URL
Источник: http://mscrm4ever.blogspot.com/2009/...ntity-url.html
==============

This is a small trick you can use to find what URL is stored behind each CRM vanilla (customizable) entity. You can use as part of your code (see my post about cloning an entity using JavaScript) or just run it in IE address bar. Although it seems this function is not going anywhere there is a chance it won’t be there on the next version.

Address bar function:
javascript:void( alert( getObjUrl( 2 ) ) )

The getObjUrl function utilizes the GetWindowInformation function which receives the entity object type code e.g. 2 – contact and return an object containing the entity Url and window size (width and height). Here is an example of how to use it inside your code:

var contactUrlInfo = GetWindowInformation(2);
var windowFeatures = “height=” + contactUrlInfo.Height + “,width=” + contactUrlInfo.Width + “,toolbars=0”;
window.open( prependOrgName( contactUrlInfo.Url ) , “contact window” , windowFeatures );


So how does this work?
The GetWindowInformation function refers to “/_common/windowinformation/windowinformation.aspx” URL. If you open this page in the address bar and take a look at the page source you’ll see a script that look like this:


function CRMWindowInfo(sUrl, iXOffset, iYOffset)
{
this.Width = parseInt(iXOffset, 10);
this.Height = parseInt(iYOffset, 10);
this.Url = sUrl;
}
function GetWindowInformation(iObjectType) {
switch (parseInt(iObjectType, 10))
{
case Account: return new CRMWindowInfo("sfa/accts/edit.aspx",1000,560);
case List: return new CRMWindowInfo("ma/lists/edit.aspx",820,560);
//and so on…
}
}


In order not to rely on ms functionality you can either work with static values or create your own page under the isv folder the returns similar js.


Источник: http://mscrm4ever.blogspot.com/2009/...ntity-url.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 30.05.2009, 18:59   #2  
Артем Enot Грунин is offline
Артем Enot Грунин
Moderator
Аватар для Артем Enot Грунин
MCBMSS
Злыдни
Most Valuable Professional
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
3,912 / 623 (28) +++++++
Регистрация: 16.08.2007
Адрес: Пермь!
Записей в блоге: 151
Так и не понял нафиг это надо
__________________
http://fixrm.wordpress.com, снятие/наведение порчи. Быстро, дорого, гарантия.

MS Certified Dirty Magic Professional
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Microsoft Dynamics CRM Team Blog: Building Rich-Client Dashboards for Microsoft Dynamics CRM with Windows Presentation Foundation Blog bot Dynamics CRM: Blogs 1 31.03.2009 13:24
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: Troubleshooting the Microsoft Dynamics CRM E-mail Router Blog bot Dynamics CRM: Blogs 0 09.01.2009 06:03
mscrm4ever: CRM 4.0 Supported Multi Select (Picklist) Control Blog bot Dynamics CRM: Blogs 0 25.12.2008 15:05
Microsoft Dynamics CRM Team Blog: Data Migration Manager Tips and Tricks Blog bot Dynamics CRM: Blogs 0 02.09.2008 22:05

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

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

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