function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger test on Account (before insert) { if(trigger.isBefore&& trigger.isInsert){ daily15limit.m2test(trigger.new); } }
public with sharing class daily15limit { public static void m2test(list<Account> Acclist){ List<Account> accOld = [select id from Account where CreatedDate = TODAY]; system.debug('accOld--------->>>>'+accOld); system.debug('accOld.size()----------'+accOld.size()); for(Account acc : Acclist) { if(accOld.size()>15) { acc.addError('Daily Limit Exceeded'); } } } }
Try this trigger
Trigger-
Handler Class-
If it helps you mark this best.
Regards
Suraj