You need to sign in to do that
Don't have an account?
jha praveen 13
update stock inventory on delete line items
How can we update stock inventory on delete line items using salesforce trigger
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Master Record: Laptops with Quantity =10
Child Record: Laptop1 with quantity =3
Laptop1 with quantity =5
Laptop1 with quantity =2
So the sum of 3+5+2=10 ultimately which will be your stock.
If it is your requirement then I would highly suggest create the Master-Detail Relationship between two objects and then use roll-up summary fields.
A trigger is also an option, where a trigger will be created on a child object on Insert, Delete and Undelete Events.
Please let me know if you want a trigger on this.