Hi everyone,
I have the following code, but it only updates the first record of Cost in Costings. I need all price.Cost records to be updated. Can anyone help?
//Fetch all records from Costings that match the Item Number and store them in a variable price.
price = Costings [Material.Description == input.Description];
//This might be the problem or the previous line of code. Should find a solution in order to update all records. At the moment it only updates one of the records (the first one). !!!!!!!!
price.Cost = input.Unit_Cost;
//Total Cost is updated when the Cost is multiplied by Quantity entered in Costings. Works well!
price.Total_Cost = (price.Cost * price.Quantity);
Cheers!
Zak