A Stock table is 1-to-many related to Stock Material table (typical relationship setup).
The purpose of Stock_Material_Total_Weight TO is so that I can display the total weight of all the material for a Stock item
The requirement is that the total weight of all the material for the same stock must be exactly 100. The user can freely modify any material BUT can not leave this master record (either by going to the next previous record, jumping to another layout etc) if the total wieght is not 100.
I have a script to detect the total weight and have trial and error various ways but not successful. I tried layout setup, portal setup, also script trigger for the field etc.