You need to sign in to do that
Don't have an account?
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!
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?