Loading
B2C Commerce Release Notes
Change Inventory Allocation with dw.catalog.ProductInventoryRecord

Change Inventory Allocation with dw.catalog.ProductInventoryRecord

With compatibility mode 21.7, you can change inventory allocation and prevent undesired allocation changes during storefront and shopper calls.

How: The dw.catalog.ProductInventoryRecord class has these updates.

  • The already-deprecated method getOnHand() has been removed.
  • The allocation amount now requires a reset date. For this reason, the setAllocation(allocationAmount, allocationResetDate) method has replaced setAllocation(allocationAmount), which has been removed.
  • Product inventory records are now read-only in a storefront context, so you can no longer call these methods within a storefront context:
    • setAllocation(allocationAmount, allocationResetDate)
    • setBackorderable(boolean)
    • setInStockDate(Date)
    • setPerpetual(boolean)
    • setPreorderable(boolean)
    • setPreorderBackorderAllocation(double)
 
Wordt geladen
Salesforce Help | Article