0

連絡先オブジェクトを更新しようとすると、このエラーが発生します。

トリガー: System.Exception: コード ステートメントが多すぎます: 200001

引き金 :

trigger Points_FromContact_Trigger on Contact (after delete, after update) {
    //This is an empty list of contacts that will contain all General contacts from our DML action
    List<Contact> contacts = new List<Contact>();
    //This is a string variable to hold the  Contact Record Type -  General recordTypeId
    String General = RecordHandler_GetRecordTypeId.getId(EnvironmentClass_RecordTypeNames.General, Schema.Sobjecttype.Contact.getName());
    if(trigger.isDelete) //If the DML action was a delete...
    {
        //... for every contact in the delete action...
        for(Contact c: trigger.old)
        {
            //... if the contact record type is the General...
            if(c.RecordTypeId == General)
            {
                //... then add the contact to our list of contacts.
                contacts.add(c);
            }
        }
    }
    else //This is an insert/update DML action.
    {
        //For every contact in the DML action...
        for(Contact c: trigger.new)
        {
            //... if the contact record type is the ES Contact Record Type - General...
            if(c.RecordTypeId == General)
            {
                //... then add the contact to our list of contacts.
                contacts.add(c);
            }
         }
    }  
}
4

0 に答える 0