• aniruddha maiti
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am trying to understand the DML and Query Record Governor limits.
Code:
list<account> a = new list<account>();
    for(integer i=0;i<9999;i++)    {
        a.add(new account(Name =('ani '+(i*4).format()),AccountNumber=('anii'+(i*8).format())));    }
      database.insert(a); 
TRying this it throws-> QUery over 50,000 records..
If I try inserting 1000 records and take the insert(a) inside the loop, DML error limit 150. I can understand that but please help me understnad the query record error. I am on Developer free edition and have only 10 records in Account object.

 
I am trying to create a validation rule for closing ticket.
The Closure Category (Picklist) and Incident Resolution field must be completed before a ticket can be closed.
I am currently using this formula but its not working for me.
AND(ISPICKVAL(BMCServiceDesk__ClosureCategory__c, ''), $User.BMCServiceDesk__IsStaffUser__c=TRUE && BMCServiceDesk__Status_ID__c ="Resolved" && (ISBLANK(BMCServiceDesk__incidentResolution__c)))