Показать сообщение отдельно
Старый 09.12.2013, 13:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,646 / 848 (80) +++++++
Регистрация: 28.10.2006
Pawan's Ax blog: How to release item using x++code in ax2012
Источник: http://pawansaxblog.blogspot.com/201...-xcode-in.html
==============

How to release a item in Ax2012 through x++ code. Below code I have used in one of my requirement

public void releaseItem(DataAreaId _dataAreaId)
{
EcoResProduct product;
InventTable inventTable;
;

select firstOnly RecID from product
where product.DisplayProductNumber == this.getItemId();

if (product.RecId)
{
inventTable = inventTable::findByProductInCompany(product.RecId, _dataAreaId);
if (!inventTable.RecId)
{
EcoResProductReleaseManagerBase::releaseProduct(product.RecId,CompanyInfo::findDataArea(_dataAreaId).RecId);
}
}

}


Источник: http://pawansaxblog.blogspot.com/201...-xcode-in.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.