function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lokeswara ReddyLokeswara Reddy 

Toast message on Opportunity when line item quantity is > 1000

Is it possible to have Toast message  on Opportunity wheneve new product with quanitty more than 1000 is added or edited. The ask is to show the warning message only once when product is updated or added.
I have seen toast messages which appears every time the record is accessed, if conditions met. But how can we just show the toast message on child record DML operations.
As per my understanding, there won't be any DML operations on Opportunity when line items are edited or updated.
Any thoughts.. 
Naveen KNNaveen KN
Write a trigger to Product object and on update or insert use addError() in your code to throw the error message on the UI. 
Here, the assumption is that the user adds or edits the product in the opportunity screen and based on the mentioned criteria we need to throw the error on the user interface.