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
netbrainnetbrain 

trigger warrings ------ File only saved locally, not to server

code:

 

trigger LeadConvertoContact on Lead (after update) {
    for(Lead l :Trigger.new)
    {
        if(l.IsConverted==true)
        {
            List<UsageLog__c> uls=[select id,Contact__c,OwnerId from UsageLog__c where leadname__c=:l.Id and Contact__c=:''];
            for(UsageLog__c uc:uls)
            {
                uc.Contact__c=l.ConvertedContactId;       
                //uc.OwnerId=l.OwnerId;                   
            }

           

            //If I comment out this line of code  can be saved to the server    ....... why?           

           update uls;                 

        }
    }
}

 

 

THanks!

Message Edited by netbrain on 09-21-2009 11:16 PM
JonSimmonsJonSimmons

That is the ONLY error that you get, no other information?

 

I find that most often when I only get that error it's because I don't have enough coverage in my unit tests.  Do your unit tests run correctly and with expected results?

 

netbrainnetbrain
thanks