static void Set_DefaultOrderSettings(Args _args)
{
InventTable inventTable;
InventItemInventSetup invent;
InventItemPurchSetup purch;
InventItemSalesSetup sales;
;
delete_from invent;
delete_from purch;
delete_from sales;
while select inventTable
{
if(!InventItemPurchSetup::findDefault(inventTable.ItemId))
{
InventItemPurchSetup::insertDefault(inventTable.ItemId);
}
if(!InventItemInventSetup::findDefault(inventTable.ItemId))
{
InventItemInventSetup::insertDefault(inventTable.ItemId);
}
if(!InventItemSalesSetup::findDefault(inventTable.ItemId))
{
InventItemSalesSetup::insertDefault(inventTable.ItemId);
}
}
}
If you have deleted the Item master and imported with new items then run this job to automatically insert the default order settings for the all items..
Otherwise system will not allow u to create any item transactions it will give error like"No Item parameter for the item"..
{
InventTable inventTable;
InventItemInventSetup invent;
InventItemPurchSetup purch;
InventItemSalesSetup sales;
;
delete_from invent;
delete_from purch;
delete_from sales;
while select inventTable
{
if(!InventItemPurchSetup::findDefault(inventTable.ItemId))
{
InventItemPurchSetup::insertDefault(inventTable.ItemId);
}
if(!InventItemInventSetup::findDefault(inventTable.ItemId))
{
InventItemInventSetup::insertDefault(inventTable.ItemId);
}
if(!InventItemSalesSetup::findDefault(inventTable.ItemId))
{
InventItemSalesSetup::insertDefault(inventTable.ItemId);
}
}
}
If you have deleted the Item master and imported with new items then run this job to automatically insert the default order settings for the all items..
Otherwise system will not allow u to create any item transactions it will give error like"No Item parameter for the item"..
No comments:
Post a Comment