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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.09.2017, 13:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
dynamicsaxinsight: AX7/D365/Operations: Enable/Disable form control in X++
Источник: https://dynamicsaxinsight.wordpress....n-x-plus-plus/
==============

Purpose:

The purpose of this document is to demonstrate how we can enable/disable a form control in X++ based on a business logic.

Product:

Dynamics 365 for Finance and Operations, Platform Update 9.

Development approach:

Customization through extension.

Development:
  1. Create a post event handler of a standard form method enabling/disabling the form controls. In this case, we are creating a post event handler of a standard method setFieldAccessHeader of SalesQuotationProjTable form.
  2. Please find the event handler method definition as follows.
[PostHandlerFor(formStr(SalesQuotationProjTable), formMethodStr(SalesQuotationProjTable, setFieldAccessHeader))]public static void SalesQuotationProjTable_Post_setFieldAccessHeader(XppPrePostArgs args){ FormRun sender = args.getThis(); FormDataSource salesQuotationTable_ds; SalesQuotationTable salesQuotationTable; salesQuotationTable_ds = sender.dataSource(1); salesQuotationTable = salesQuotationTable_ds.cursor(); sender.control(sender.controlId(formControlStr(SalesQuotationProjTable, DeviceUsageGroup))).enabled((salesQuotationTable.AMDeviceId) ? true : false);}


Источник: https://dynamicsaxinsight.wordpress....n-x-plus-plus/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
sertandev: Using 3rd party Web components in AX7; an introduction to extensible controls Blog bot DAX Blogs 0 28.08.2017 19:11
stoneridgesoftware: Form event handlers in Microsoft Dynamics 365 for Operations (AX7) Blog bot DAX Blogs 0 02.12.2016 04:21
dynamicsaxtraining: Vendor returns Blog bot DAX Blogs 0 11.10.2012 00:11
dynamicsaxtraining: Purchase Blog bot DAX Blogs 0 11.03.2012 05:25
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

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