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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.04.2010, 23:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
Dynamics AX Sustained Engineering: How to prevent transaction reversal from posting to closed dimensions
Источник: http://blogs.technet.com/dynamicsaxs...imensions.aspx
==============

Current behavior of Dynamics AX allows for transaction reversals to post without a warning or error message when the reversal will post to a dimension that is closed. If you wish to have a message appear to stop the reversal, this can be achieved by making the following modification. Please note that the reversal process will be blocked by this code if the posting will affect a closed dimension so you will need to create an entry manually through a journal to reverse the effects of the transaction originally intended to be reversed.

The change would be made to \Classes\LedgerVoucherTransObject\check.

From:

...

// Find the account and then call the instance based nethods to validate the account.
ledgerTable = LedgerTable::find(ledgerTrans.AccountNum);
ok = ledgerTable.checkPostingType(ledgerTrans.Posting,false) && ok;
ok = Dimensions::checkDimension(ledgerTrans.Dimension, true,
_ledgerVoucher.parmCheckBlockedDimensions()) && ok;
ok = LedgerTable::checkDimension(ledgerTrans.AccountNum, ledgerTrans.Dimension) && ok;


ok = appl.dimensionSetValidation(false, company).checkDimension(ledgerTrans,
fieldnum(LedgerTrans, Dimension),
false, false, true) && ok;
ok = ledgerTable.checkUserId(curuserid()) && ok;


ok = ledgerTable.checkAccountCurrency(ledgerTrans.CurrencyCode,
(ledgerTrans.Posting == LedgerPostingType::ExchRateGain ||
ledgerTrans.Posting == LedgerPostingType::ExchRateLoss)) && ok;
}


// Validating amount

...

To:

...

// Find the account and then call the instance based nethods to validate the account.
ledgerTable = LedgerTable::find(ledgerTrans.AccountNum);
ok = ledgerTable.checkPostingType(ledgerTrans.Posting,false) && ok;
ok = LedgerTable::checkDimension(ledgerTrans.AccountNum, ledgerTrans.Dimension) && ok;


ok = appl.dimensionSetValidation(false, company).checkDimension(ledgerTrans,
fieldnum(LedgerTrans, Dimension),
false, false, true) && ok;
ok = ledgerTable.checkUserId(curuserid()) && ok;


ok = ledgerTable.checkAccountCurrency(ledgerTrans.CurrencyCode,
(ledgerTrans.Posting == LedgerPostingType::ExchRateGain ||
ledgerTrans.Posting == LedgerPostingType::ExchRateLoss)) && ok;
}


//Validate dimension

ok = Dimensions::checkDimension(ledgerTrans.Dimension, true,
_ledgerVoucher.parmCheckBlockedDimensions()) && ok;


// Validating amount

...







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

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Dynamics AX Sustained Engineering: Performance issue in "Open Transaction Edit" form Blog bot DAX Blogs 0 26.10.2009 20:05
Dynamics AX Sustained Engineering: Microsoft Dynamics AX 4.0 and AX 2009 are compatible with Microsoft Windows 7 and Microsoft Windows Server 2008 R2 Blog bot DAX Blogs 0 22.09.2009 04:06
Dynamics AX Sustained Engineering: Dynamics AX 2009 Patching Blog bot DAX Blogs 0 08.10.2008 10:05
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Inside Dynamics AX 4.0: Transaction Semantics Blog bot DAX Blogs 0 31.10.2007 23:40

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

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

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