Hi Mike,
I want to create a trigger to update the in_sellingprice.forwardprice1 field based on a calcuation from a customsettings inventory maintenance.
I have created a custom setting with the ID of P1GP.
Also the contents of the customsetting may need to be converted to a number, although it is entered as a number in Jiwa already.
I have the following, but it does not seem to work. Could you please help.
update in_sellingprices
set ForwardPrice1 =
(SELECT In_Main.LCost * (1+ IN_CustomSettingValues.Contents/100)
FROM IN_SellingPrices, IN_Main INNER JOIN
IN_Main ON IN_SellingPrices.InventoryID = IN_Main.InventoryID INNER JOIN
IN_CustomSettingValues ON IN_Main.InventoryID = IN_CustomSettingValues.InventoryID and
IN_CustomSettingValues.SettingID = 'P1GP')