static void InventAllBlank(Args _args)
{
InventDimId InventDimId;
InventItemInventSetup InventItemInventSetup;
InventItemSalesSetup InventItemSalesSetup;
InventItemPurchSetup InventItemPurchSetup;
inventtable inventtable;
;
while select * from inventtable where inventTable.ItemId
{
//invent
select forupdate * from InventItemInventSetup where InventItemInventSetup.ItemId == inventtable.ItemId
&& InventItemInventSetup.InventDimId == "AllBlank"
&& InventItemInventSetup.InventDimIdDefault == "AllBlank";
if(!InventItemInventSetup.ItemId)
{
ttsbegin;
InventItemInventSetup.ItemId = inventtable.ItemId;
InventItemInventSetup.InventDimId = "AllBlank";
InventItemInventSetup.InventDimIdDefault = "AllBlank";
InventItemInventSetup.insert();
ttscommit;
}
// sales
select forupdate * from InventItemSalesSetup where InventItemSalesSetup.ItemId == inventtable.ItemId
&& InventItemSalesSetup.InventDimId == "AllBlank"
&& InventItemSalesSetup.InventDimIdDefault == "AllBlank";
if(!InventItemSalesSetup.ItemId)
{
ttsbegin;
InventItemSalesSetup.ItemId = inventtable.ItemId;
InventItemSalesSetup.InventDimId = "AllBlank";
InventItemSalesSetup.InventDimIdDefault = "AllBlank";
InventItemSalesSetup.insert();
ttscommit;
}
//purchase
select forupdate * from InventItemPurchSetup where InventItemPurchSetup.ItemId == inventtable.ItemId
&& InventItemPurchSetup.InventDimId == "AllBlank"
&& InventItemPurchSetup.InventDimIdDefault == "AllBlank";
if(!InventItemPurchSetup.ItemId)
{
ttsbegin;
InventItemPurchSetup.ItemId = inventtable.ItemId;
InventItemPurchSetup.InventDimId = "AllBlank";
InventItemPurchSetup.InventDimIdDefault = "AllBlank";
InventItemPurchSetup.insert();
ttscommit;
}
}
}
Subscribe to:
Post Comments (Atom)
How to identify the user that was used to change an object from AOT in AX2012
Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...
-
Combo boxes in Dialogs are added by adding a DialogField object with the type of an enum. The enum is then controlling what items you can pi...
-
This article explains: How to picking list through a job using X++ in Dynamics AX. Applied on: Dynamics AX 2009 SP1 Create a job a...
-
A while ago I had the need to translate labels, I was creating eMail bodys while using SysMailer and wanted to use different languages for d...
No comments:
Post a Comment