#9404 [Shopify] Fix Sync Prices using stale WorkDate from SingleInstance cache
Fixed the Shopify product price calculator to rebuild its cached temporary sales header when the Work Date changes, preventing price sync from applying outdated discounts after changing the work date mid-session.
- 3files
- 1AL files
- 1objects
Pull request · merged into main (BC30) on 2026-07-15 by onbuyuka · 3 files (+97 -1), 1 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Added WorkDate() check to SetShop() guard condition to detect work date changes
- Cached temporary sales header is now rebuilt when work date changes, not just when shop code or SystemModifiedAt changes
- Added regression test that verifies correct discount application after work date change without shop record modification
- SetShopAndCatalog() method already recreates header unconditionally, so it required no changes
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 30182 “Shpfy Product Price Calc.”, Shopify: modified
Context
- Work items: AB#642194
- Labels: AL: Apps (W1)
- Systems: integration
- From the description: “running Sync Prices after changing the Work Date could apply the discount valid for the previous Work Date”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Synchronize prices with Shopify — possibly related: Documents synchronizing product prices with Shopify from Business Central (model-linked)
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).