# Update large pricelists

**URL:** <https://forum.litium.com/t/update-large-pricelists/1470>\
**Category:** Questions\
**Created:** [May 7, 2020, 7:06pm UTC](https://forum.litium.com/t/update-large-pricelists/1470 "2020-05-07T19:06:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NiclasSparr](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/niclassparr/32/96_2.png) [@NiclasSparr](https://forum.litium.com/u/NiclasSparr)\
**Post date:** [May 7, 2020, 7:06pm UTC](https://forum.litium.com/t/update-large-pricelists/1470/1 "2020-05-07T19:06:34Z")

</div>

Hi,

What is the fastest way to import prices in litium 7.4.2?  
In 7.3.3 we fetched the entire pricelist with var pricelist = \_priceListService.Get(data.PriceListId, true), then updated the price items, then saved with \_priceListService.Update(priceList);

But priceListService.Get(data.PriceListId, true), is depricated in 7.4.2. In the upgrade we changed to use batch.Create(…), batch.Update(…), batch.Commit(), but this seems to be a lot slower.

Litium version: 7.4.2

---

<div class="post-metadata">

**Author:** ![Artur](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/artur/32/948_2.png) [@Artur](https://forum.litium.com/u/Artur)\
**Post date:** [May 11, 2020, 4:14pm UTC](https://forum.litium.com/t/update-large-pricelists/1470/2 "2020-05-11T16:14:51Z")

</div>

I think it should be the way InventoryItem is used;  
[https://docs.litium.com/api-reference/api?product=Litium&version=7.4&xref=Litium.Products.PriceListItemService](https://docs.litium.com/api-reference/api?product=Litium&version=7.4&xref=Litium.Products.PriceListItemService)

So fetch all PriceListItems and if its not there create it and use batch to update/create multiple and then commit.

(I have only done this with InventoryItems but using batching and avoiding fetch for each it goes quite fast)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [June 8, 2020, 4:25pm UTC](https://forum.litium.com/t/update-large-pricelists/1470/3 "2020-06-08T16:25:30Z")

</div>

Closed on June 8, 2020, 4:25pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
