WhsLocationDirective.findLocation()
WhsLocationDirective.buildLocDirTableQuery()
WhsLocationDirective.findPickPutLocation WhsLocationDirective.findLocation() WhsLocationDirective.hasLocDirMatches() WhsLocationDirective.buildLocDirTableQuery()Location directive Query example:
SELECT * FROM InventTable(InventTable_1) WHERE ((ItemId = N'VK075')) JOIN * FROM WHSInventTable(WHSInventTable) ON InventTable.ItemId = WHSInventTable.ItemId WHERE ((InventTable(InventTable_1).)) EXISTS JOIN * FROM WHSProductVariantFixedLocation(WHSProductVariantFixedLocation_1) WHERE InventTable.ItemId = WHSProductVariantFixedLocation.ItemId AND ((WMSLocationId LIKE N'301*'))}A user added the WHSProductVariantFixedLocation data source to the location directive query. However, the WHSProductVariantFixedLocation table contains records per each product variant. To achieve what was initially intended by the user (directive should be triggered for a specific fixed product variant location, which is tied with the correct product variant) we can modify the query in WhsLocationDirective.buildLocDirTableQuery() method using CoC and if the query contains WHSProductVariantFixedLocation datasource add additional range to it on ProductVariantInventDimId field.

3. Make code changes to apply additional changes to the Location Directive Action query.WhsLocationDirective.loopLocDirLines() WhsLocationDirective.isLocationDirectiveActionApplicable() !! WhsLocationDirective.isProductApplicableForProductVariantFixedLocDirAction() WhsLocationDirective.createActionQuery() WhsLocationDirectiveActionQuery WhsLocationDirectiveActionQuery.buildQueryRun() WhsLocationDirectiveActionQuery.modifyPutLocDirActionQuery() WhsLocationDirectiveActionQuery.addFixedInventLocationQueryRange() !!Location Directive Action Query example (Only fixed locations for the product variant):
SELECT inventLocationId, LocProfileId, wMSLocationId FROM WMSLocation(WMSLocation) WHERE ((inventLocationId = N'10')) EXISTS JOIN * FROM WHSProductVariantFixedLocation(WHSProductVariantFixedLocation_1) WHERE WMSLocation.inventLocationId = WHSProductVariantFixedLocation.InventLocationId AND WMSLocation.wMSLocationId = WHSProductVariantFixedLocation.WMSLocationId AND ((ItemId = N'VK075')) AND ((ProductVariantInventDimId = N'#000000015000061C'))}
If you found value in what I share, I've set up a Buy Me a Coffee page as a way to show your support.
Buy Me a CoffeeNo comments. Be the first one to comment on this post.
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics 365 FO.
Authors are allowed to set their own "buy me a coffee" link.
Join us.