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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 23.02.2011, 21:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,640 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Document References Are Not Always Deleted
Источник: http://blogs.msdn.com/b/emeadaxsuppo...s-deleted.aspx
==============

In Dynamics AX it’s possible to add in document reference in many forms using the document handling functionality. However, when you sometimes delete a record that has an associated document reference; this reference in the DocuRef table remains. This is due to the fact that there is not always a relation between a table and DocuRef. Therefore if you run the consistency check report, you may find that you see lots of missing references found as the parent table record no longer exist.

One example of this is the ProdTable, for production orders. In order to make this function so that whenever you delete a record, it deletes the associated document reference follow these steps below (this example if for ProdTable, but just follow the same process for your required tables):
  • From the AOT expand to Data Dictionary > Tables > DocuRef > Relations
  • Add in a new relation – call it ProdTable
  • Set the properties on this relation to point to the ProdTable
  • Add in the following 3 relations (all relation type Normal)
    • DocuRef.RefRecId == ProdTable.RecId
    • DocuRef.RefRecTableId == ProdTable.TableId
    • DocuRef.RefCompanyId == ProdTable.dataAreaId
  • Save the DocuRef table.

  • Next go to AOT > Data Dictionary > Tables > ProdTable > DeleteActions
  • Add in a new Delete Action, set the properties to be:
    • Table: DocuRef
    • DeleteAction: Cascade



  • Save the changes.
  • Now when you run the consistency check you will not get any errors on ProdTable for new notes added. You may still see old records as these need to be manually cleaned.
Note: Please make sure that you have backups of application files and data before making changes.

author:Thomas Treeneditor:Thomas Treendate:18/Feb/2011


Источник: http://blogs.msdn.com/b/emeadaxsuppo...s-deleted.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: Multiline Fields in AX Document Management Blog bot DAX Blogs 0 10.01.2011 17:11
emeadaxsupport: Unable to validate workflow URL in AX 2009 - Get the following error: The request failed with HTTP status 405: Method Not Allowed Blog bot DAX Blogs 0 07.07.2010 23:05
emeadaxsupport: Warning when loading license file - License value for ID 2024 has not been created (or License value for ID 2025 has not been created) Blog bot DAX Blogs 0 12.01.2010 04:44
emeadaxsupport: Certain User groups cannot be deleted in Dynamics AX Blog bot DAX Blogs 0 29.07.2009 19:05
emeadaxsupport: AxUpdatePortal.exe does not update Enterprise Portal when not running from an elevated command prompt Blog bot DAX Blogs 0 26.07.2009 15:07

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:12.