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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 01.12.2021, 06:45   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
dynamicsaxinsight: Add table to a default description
Источник: https://dynamicsaxinsight.wordpress....t-description/
==============

Purpose:

The purpose of this post is to demonstrate how can we extend default descriptions by adding a new table to the default description definition.

Application:

Dynamics 365 Finance and Operations

Prerequisites:
  • Understanding of how default descriptions work
Business requirement:

Use customer free text invoice line description field in the definition of Customer – tax invoice, customer default description.

Out of the box only two tables are available to select, CustInvoiceTable and CustInvoiceJour. The requirement is to add CustInvoiceLine.

Solution:

It can be achieved by developing an extension class of TransactionTextContextCust class.

Code

[ExtensionOf(classStr(TransactionTextContextCust))]final class TransactionTextContextCustMAK_Extension{ private CustInvoiceLine custInvoiceLine; /// /// Provides a list of tables that are supported for use with a specified transaction type. /// /// /// A container that contains a collection of TableId values of tables that are supported by a /// specified transaction type. /// public container getSupportedTables() { container tableList; tableList = next getSupportedTables(); tableList += tableNum(CustInvoiceLine); return tableList; } /// /// Sets the parameter variable of an object to contain the records that are used with a specified /// transaction type. /// /// /// This method must be called before the table fields and values are mapped for the transaction text /// setup parameters. /// public void setParameters() { next setParameters(); parameters = [custInvoiceJour, custInvoiceTable, custInvoiceLine]; } /// /// Set a particular table buffer for a specified transaction type. /// /// /// The Common record that is set based on the TableId value of the buffer. /// /// /// true if the table is supported and the buffer is saved; otherwise, false. /// /// /// The Common record is cast to the appropriate table through switch logic. /// This method can be called repeatedly to assign multiple buffers. /// /// /// The table is not supported by this transaction type. /// public boolean setTableBuffer(Common _common) { boolean tableBufferSet; tableBufferSet = next setTableBuffer(_common); switch (_common.TableId) { case tableNum(CustInvoiceTable): custInvoiceLine = CustInvoiceLine::findByParentRecId(custInvoiceTable.RecId); tableBufferSet = true; break; } return tableBufferSet; }}



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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
alexef: How to add a field to Item Card in Business Central Blog bot NAV: Blogs 0 22.05.2018 20:11
saurav-nav: NAV 2018 - Lots of New Objects! Blog bot NAV: Blogs 0 04.12.2017 10:11
Быстродействие метда TaxParameters::find Ace of Database DAX: Программирование 7 01.06.2017 11:46
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
wiki.dynamicsbook: Changes Made in Navision Attain 301 Blog bot Dynamics CRM: Blogs 0 19.08.2008 13:44
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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