Hi everyone, I ask you for help with the following, I am doing a stock integration between Business Central and Dynamicweb, but it has a peculiarity, BC manages a base unit of measure and two sales units of measure, however in the ERP the stock is managed entirely in the base unit of measure, but to DW I must pass the available stock in sales units of measure.
I explain the process with the following example:
I have the Orange Flavor product, it is handled in Kg and is sold in 1 Kg jars and 2 Kg bottles. The availablg of this product in the blue warehouse is 51 Kg and in the green warehouse it is 32 Kg.
I should transfer to DW, that the Orange Flavor has stock available in the Blue warehouse of 51 bottles if the customer wants to buy bottles and 25 bottles if he wants to buy bottles,. and the green warehouse has 32 jars and 16 bottles.
I think you should do some customization on one of these events ProductsPublisher.OnBeforeGetProductStockRequest / ProductsPublisher.OnAfterGetProductStockRequest.
But what code should I use to replace the available in Kg, by the available in jars and bottles?
How do I include the data of warehouse and unit of measure?
Because when I use Get Product Stock Simple or Get Product Stock Advance it doesn't show the warehouse and unit of measure, in the retrieved data.
I would really appreciate it if you could give me some information on how to solve this requirement.