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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.07.2024, 15:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,554 / 848 (80) +++++++
Регистрация: 28.10.2006
dynamicsaxinsight: D365: Add field to New released product dialog form and persist to table
Источник: https://dynamicsaxinsight.com/2024/0...sist-to-table/
==============

Purpose:

Demonstrate how can we persist a custom field added to the New released product dialog form to the table in X++.

Application:

Dynamics 365 for Finance and Operations

Business requirement:

Business requirement is to add a new field to the New released product dialog form.

Solution:

We’re extending the EcoResProductCreate form and using chain-of-command extending the createData2Controls() method to add the new fields to the data2Controls container.

Also, in the second method, we’re making newly added field groups visible if this is a released product record.

Code

[ExtensionOf(formStr(EcoResProductCreate))]final class ATLAS_EcoResProductCreate_Form_Extension{ protected void createData2Controls() { next createData2Controls(); data2Controls = conIns(data2Controls, conLen(data2Controls) + 1, [tableStr(EcoResProduct), [[fieldNum(EcoResProduct, ATLAS_Manufacturer), formControlStr(EcoResProductCreate, ATLAS_Manufacturer)]]]); data2Controls = conIns(data2Controls, conLen(data2Controls) + 1, [tableStr(InventTable), [[fieldNum(InventTable, ATLAS_ManufacturerPartNum), formControlStr(EcoResProductCreate, ATLAS_ManufacturerPartNum)]]]); data2Controls = conIns(data2Controls, conLen(data2Controls) + 1, [tableStr(InventTable), [[fieldNum(InventTable, ATLAS_CatalogueType), formControlStr(EcoResProductCreate, ATLAS_CatalogueType)]]]); } public void setMoreFieldsVisible() { next setMoreFieldsVisible(); if (this.productData().identification().isReleasedProduct()) { ATLAS_ManufacturerGroup.visible(true); ATLAS_CancerCareGroup.visible(true); this.updateLayout(); } }}


Источник: https://dynamicsaxinsight.com/2024/0...sist-to-table/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Dynamics 365 and Power Platform Monthly Update-September 2021 Blog bot Dynamics CRM: Blogs 0 11.09.2021 09:04
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 16 Blog bot Dynamics CRM: Blogs 0 23.01.2014 03:15
Microsoft Dynamics CRM Team Blog: How to Add a Record Wall to a Form Blog bot Dynamics CRM: Blogs 0 10.11.2011 04:19

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

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

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