Skip to main content

Posts

Showing posts from 2022

The troubles of extending/correcting a lookup doing a wrong filter when the lookup is based on table relations

 Working in the WHS module a customer needed to be able to change the transport provider (carrier) and the provided service (carrier service) directly on the Shipment chosen in the pack form. This presents some interesting challenges, working within the limits of the extension mechanisms in D365. Firstly as of time of writing the application implements a table relation on the WHSShipment table to the table TMSCarrierService (transport service codes provided by a carrier). It does so by having a Normal field relation between TMSCarrierService.CarrierServiceCode and WHSShipmenttable.CarrierServiceCode, thus NOT taking in to consideration the Carrier that have been chosen on the shipment. Trouble is that you can not change a table relation using extensions, AND you can not using extensions to introduce a new (correct) relation that overrides the existing one. So instead of just changing the table relation (if that was possible and simple), I needed to do 4 extensions. 1) A new class with