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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 09.10.2007, 11:55   #1  
tatra is offline
tatra
Участник
 
229 / 11 (1) +
Регистрация: 21.09.2007
Адрес: Самара
Событие OnLoad.
Я столкнулся с такой проблемой. У меня для ОРГАНИЗАЦИИ работает событие OnLOAD на главной форме. Как сделать так, чтобы это событие не включплось при открытии другого представления (БЫСТРОЕ СОЗДАНИЕапример). А то выдает ошибку.
Спасибо.
Старый 09.10.2007, 12:15   #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
Вставьте в скрипт проверку на тип формы (создание, открытие готового, быстрое создание) и обрабатывайте только по нужному сценарию.
Старый 09.10.2007, 12:28   #3  
tatra is offline
tatra
Участник
 
229 / 11 (1) +
Регистрация: 21.09.2007
Адрес: Самара
А какое значение crmForm.FormType должно быть для быстрого создания?
Старый 09.10.2007, 13:24   #4  
zhenek is offline
zhenek
Участник
 
133 / 10 (1) +
Регистрация: 01.02.2007
The following table contains additional information about form types.
Form Form type value Description
Undefined 0 For internal use only.
Create 1 This is the main form for an entity, displayed with blank values when creating an entity instance.
Update 2 This is the main form for an entity, displayed with the current values for the entity instance being updated.
Read only 3 This is the main form for an entity, displayed with the current values for the entity instance. All fields are disabled. This is used when the user does not have privileges or acess rights to edit the entity instance.
Disabled 4 This is the main form for an entity, displayed with the current values for the entity instance. All fields are disabled. This is used when the entity instance is in the Inactive state.
Quick create 5 This form is accessible from the lookup dialog. It is not available for custom entities. It contains the minimum fields needed to create an entity instance.
Bulk edit 6 This form is used for editing multiple instances at a time.

Последний раз редактировалось zhenek; 09.10.2007 в 13:28.
Старый 09.10.2007, 13:29   #5  
zhenek is offline
zhenek
Участник
 
133 / 10 (1) +
Регистрация: 01.02.2007
X++:
var CRM_FORM_TYPE_CREATE = "1"; 
var CRM_FORM_TYPE_UPDATE = "2";  
switch (crmForm.FormType) 
{    
case CRM_FORM_TYPE_CREATE:       alert("This is a create form.");       break;     
case CRM_FORM_TYPE_UPDATE:       alert("This is an update form, the ID is " + crmForm.ObjectId + ".");       break; 
}
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Событие "Назначение записи" для бизнес-процесса Lazarus Dynamics CRM: Функционал 1 22.01.2009 19:54
Как можно подписаться на событие завершения и отмены заказа? homer12 Dynamics CRM: Разработка 2 04.12.2008 18:10
Не вызывается OnLoad() heon Dynamics CRM: Разработка 3 23.09.2008 22:22
Сделать активным поле из onLoad tatra Dynamics CRM: Разработка 1 01.11.2007 09:24
событие Update object в workflow shumelka Dynamics CRM: Функционал 1 18.03.2005 11:39

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

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

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