AnsweredAssumed Answered

Displaying the warning message on Object list layout.

Question asked by rahul.agrawal03 on Jun 21, 2011
Latest reply on Jun 24, 2011 by rahul.agrawal03
Hi,

I have a subobject 'subobj1' of Project. Therefore, we can create multiple instances of 'subobj1' under a Project. In each subobj1 instance we have a column called 'percentage'. The sum of all the 'subobj1' instances for a single project should be 100% in ideal case. However, while creating a new instance, updating/deleting a existing instance, if the sum of 'percentage'column of all the existing + new instances is not 100% then system should allow the values to be saved in Database, after the successfull save, system should throw a warning 'Total of all instances is not 100%'. This message should be displayed on the 'subobj1' list layout. I have tried using AFTER trigger but the problem is this will roll back entire transaction and values will not get saved in DB. Also, we will not be able to display the message on the list page.
How can I achieve this ?

Thanks,
Rahul

Outcomes