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
sumit pawarsumit pawar 

how to create trigger for validation error?

i have 3 objects project,saler,recordupdates

project object having level name picklistfield and having values a,b,c

i have records in recordupdates object which contains level name and field name

and now i want to set validation for saler object fields...on which fields are in recordupdates object records.

Please suggest...
nbknbk
Example is below highlighted.
create trigger TR_account (after insert,after update)
for(Account sObj : trigger.old)
                                            {
                                                if(somecondition==true)
                                                {
                                                   sObj.addError('validation message');
                                                }
                                            }