1 件の回答
Hi Ramana,>> https://developer.salesforce.com/forums/ForumsMain?id=9062I000000DGreI think this is another question regarding the same issue mentioned over in the above link as stated you won't be able to show an error and update the field on new record that is being inserted.
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future. Thanks.from the manual
SObject Class | Apex Developer Guide | Salesforce Developers (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_sobject.htm)
addError(errorMsg)
Marks a trigger record with a custom error message and prevents any DML operation from occurring.