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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.02.2024, 19:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
a33ik: UnitOfMeasureConverter::convert() method is depreciated
Источник: http://daxonline.org/1940-unitofmeas...preciated.html
==============

Message: BP Rule: [BPDeprecatedUOMProductParameter]:BPDeprecatedUOMProductParameter: The product parameter in UnitOfMeasureConverter class method 'convert' is deprecated, use the EcoResProductUnitConverter class instead.


Original deprecated code:
salesLine.SalesDeliverNow = UnitOfMeasureConverter::convert( salesLine.InventDeliverNow, UnitOfMeasure::unitOfMeasureIdBySymbol(salesLine.inventTable().inventUnitId()), UnitOfMeasure::unitOfMeasureIdBySymbol(salesLine.SalesUnit), NoYes::Yes, InventTable::itemProduct(salesLine.ItemId));

Used to convert quantity from invent to sales. Replacement using EcoResProductUnitConverter class:
salesLine.SalesDeliverNow = EcoResProductUnitConverter::convertGivenUnitSymbolsForReleasedProduct( salesLine.ItemId, salesLine.InventDimId, salesLine.InventDeliverNow, salesLine.inventTable().inventUnitId(), salesLine.SalesUnit, NoYes::Yes);

Reference: smmSalesCustItemStatisticsDP.unitConvertValue() class:
public Qty unitConvertValue( ItemId _itemId, InventDimId _inventDimId, ModuleInventPurchSales _module, UnitOfMeasureSymbol _unitFrom, Qty _value = 1) { UnitOfMeasureSymbol unitTo = InventTableModule::find(_itemId, _module).UnitId; if (_unitFrom != unitTo) { UnitOfMeasureSymbol unitInvent = InventTableModule::find(_itemId, ModuleInventPurchSales::Invent).UnitId; EcoResProductUnitConverter productUnitConverter = EcoResProductUnitConverter::newGivenUnitSymbolsForReleasedProduct( _itemId, _inventDimId, _unitFrom, unitInvent, NoYes::Yes); InventQty inventQty = productUnitConverter.convertValue(_value); productUnitConverter.parmFromUnitOfMeasureSymbol(unitInvent); productUnitConverter.parmToUnitOfMeasureSymbol(unitTo); return productUnitConverter.convertValue(inventQty); } return _value; }



Источник: http://daxonline.org/1940-unitofmeas...preciated.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
a33ik: D365 - How to convert DateTime value to Unix DateTime using C# or X++? Blog bot DAX Blogs 0 25.11.2019 14:12
dynamicsax-fico: Parallel accounting according to the “Cost of Sales” and “Nature of Expense” accounting method (3) Blog bot DAX Blogs 0 01.07.2016 07:11
dynamicsax-fico: Parallel accounting according to the “Cost of Sales” and “Nature of Expense” accounting method (1) Blog bot DAX Blogs 0 18.06.2016 08:19
Navigate Into Success: Try..Catch for .NET Interoperability Blog bot Dynamics CRM: Blogs 0 29.10.2014 09:00
littleax: Part1. Dynamics ax 2012. Split construct method by models. Blog bot DAX Blogs 0 28.05.2014 10:11

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

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

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