Activate Price for bulk Items . Dynamics AX 2012 R2

1.1k views Asked by At

I need to Update Prices for bulk of items for each warehouse. The Activate Price button is on InventItemPrice Form (Path: PIM > Released Products > Manage Cost > Item Price).

I have a process where I am using the same code of that Activate Price button to update prices for bulk products for each warehouse.

So the activate Button will go one by one (each product with each warehouse) at one time and will activate.

If I do this way, it is taking lot of time to update prices for bulk amount of Products.

Is there any other alternative for this to Activate price for bulk products?

I observed one more thing in this process, if there are multiple records in InventTrans for an Item then in the process of this activation, InventStdCostAdjust::adjustCostFinancialTrans method has a query which loops as many times as the records in inventTrans which is making this process hangup/making slow because some items have 1000's of records in that table for each item.

So to conclude this, I would need some help or need some tips about Best Approach to Activate Prices for Bulk Products(70000 approx)(5warehouses).

1

There are 1 answers

0
Raj On BEST ANSWER

As SShaheen suggested, I wrote a batch job with a query that accepts Warehouse as a Parameter. I tried to run 6 batch jobs at same time, but it throws error saying deadlock for item. This happens because all are picking the same item for 6 warehouses so this happens.

I tried to run the batch job with First ware house and then wait for couple of mins and started second one and similarly 3,4,5,6. This WORKED. This helped me to reduce the time taken by 6. (TotalTime)/6. I am still working on trying to decrease this time as I have around 80000 records. Will keep posted if i found a better solution.