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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 10.11.2017, 10:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,448 / 846 (79) +++++++
Регистрация: 28.10.2006
stoneridgesoftware: Project Committed Cost Not Updating After Changes to PO in Dynamics AX
Источник: https://stoneridgesoftware.com/proje...n-dynamics-ax/
==============

If you are running Dynamics AX 2012 and are doing work within the Project module you might have noticed an issue around committed costs on projects. In this example, we are looking at how committed costs work with Purchase Orders in Dynamics AX.

I’m going to assume you have a project setup along with a vendor. This scenario goes something like this.
  1. Create a PO and assign a project to it.
  2. Add a line to the PO
  3. Confirm the PO
  4. Go check your Committed Cost on the project and notice that everything is great
  5. You realize you made a mistake on the PO line so you go open the PO make your change and reconfirm
  6. You check your Committed Cost and realize that something isn’t right.
To fix this, there is a small code change that can be made to make sure that issue doesn’t happen again.

If you look at the ProjectCommitmentFacade class, in the doUpdateProjectCommitments method you will see that after a delete happens, the table buffer never gets cleared.

Simply, what you need to add is the following line to a couple places:
costControlTransComittedCostCheck.clear();

As an example:

if (!projectCommitmentsMap.exists(key)){//Relieve existing project commitment costControlPostingSourceDocumentLine = CostControlPostingSourceDocumentLine::construct( _sourceDocumentLineItem, costControlTransCommittedCost.ProjTransId, costControlTransCommittedCost.ProjId, costControlTransCommittedCost.CategoryId, costControlTransCommittedCost.ActivityNumber, costControlTransCommittedCost.LedgerDimension, 0, costControlTransCommittedCost.CurrencyCode, 0, 0, 0); costControlPostingSourceDocumentLine.parmSupressMessages(_supressMessages); costControlPostingSourceDocumentLine.run(ProjCommittedCostUpdateAction::Delete); costControlTransCommittedCostCheck.clear();}

With this simple change, your committed costs will now be correct, no matter what change you make on the PO.



Источник: https://stoneridgesoftware.com/proje...n-dynamics-ax/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
stoneridgesoftware: Version Control in Dynamics AX: Check-in a project and all of its pending objects Blog bot DAX Blogs 0 11.11.2016 04:26
emeadaxsupport: Project indirect cost components in AX 2012 Blog bot DAX Blogs 0 31.07.2014 22:11
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 17 Blog bot Dynamics CRM: Blogs 0 10.05.2014 06:30
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 12 Blog bot Dynamics CRM: Blogs 0 30.01.2013 01:11
gatesasbait: Dynamics AX 2009 SSRS and SSAS Integration Tips Blog bot DAX Blogs 3 09.07.2009 13:07
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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