when i execute this schedule apex class from developer console  the class is scheduled at 4 different timings as queue. when "schedule Job2" running i got this exception in debug log shows      "|EXCEPTION_THROWN|[21]|System.AsyncException: The Apex job named   "Scheduled Job0" is already scheduled for execution"   and in debug log the future call shows  : "Number of future calls: 1 out of 50"  but  i'm not getting the any records pulling from external source   this is scheduled class  global class SchedulingService implements Schedulable {      global void execute(SchedulableContext SC){            ServiceNowUpsert.GetIncident('abcd','1234','https://abcd.service-now.com');                    String day = string.valueOf(system.now().day());           String month = string.valueOf(system.now().month());           String hour = string.valueOf(system.now().hour());           String minute = string.valueOf(system.now().minute() + 15);           String second = string.valueOf(system.now().second());           String year = string.valueOf(system.now().year());            String cronStr = '0 0,15 * * * *';//changes required           String strJobName = 'Job-' + second + '_' + minute + '_' + hour + '_' + day + '_' + month + '_' + year;           // String strSchedule = '0 ' + minute + ' ' + hour + ' ' + day + ' ' + month + ' ?' + ' ' + year;           //System.schedule(strJobName, cronStr, new SchedulingServiceNow()); //changes required           System.schedule('Scheduled Job0', '0 0 * * * ?',  new SchedulingService ());              System.schedule('Scheduled Job1', '0 15 * * * ?', new SchedulingService ());           System.schedule('Scheduled Job2', '0 30 * * * ?', new SchedulingService ());           System.schedule('Scheduled Job3', '0 45 * * * ?', new SchedulingService ());            for( CronTrigger c:[Select State,Id,EndTime,CronExpression From CronTrigger where                                               NextFireTime= null  AND State='DELETED' Limit 100]){                          System.abortJob(c.id);                 }             }        }     This is my apex class   global with sharing class ServiceNowUpsert {      @TestVisible static HttpResponse res;      @future(callout=true)      global static void GetIncident(String username1, String password1, String endpointUrl1){           Http http = new Http();         HttpRequest req =  new HttpRequest();         Blob headerValue = Blob.valueOf(username1 + ':' + password1);         String authorizationHeader = 'BASIC ' +         EncodingUtil.base64Encode(headerValue);         req.setHeader('Authorization', authorizationHeader);         req.setHeader('Content-Type', 'application/json');  //displays data in JSON format           req.setEndpoint(endpointUrl1+'/api/now/table/incident?sysparm_query=sys_updated_onONLast+hour%40javascript%3Ags.hoursAgoStart%282%29%40javascript%3Ags.hoursAgoEnd%280%29&amp;sysparm_fields=impact%2Cincident_state%2Cshort_description%2Csys_id%2Ccontact_type&amp;u_sftype=true');                req.setMethod('GET');           res = http.send(req);         System.debug('MyResult == :'+res.getBody());            Deserialization.ResponseResult theresult1 = (Deserialization.ResponseResult)JSON.deserialize(res.getBody(),  Deserialization.ResponseResult.class);         System.debug('MyResult == :' + theresult1 );           List&lt;Case&gt; casesToUpsert = new List&lt;Case&gt;();                 for(Deserialization d : theresult1.result ){                  Case c = new Case();                  c.Priority = d.impact;                 c.Status = d.incident_state;                 c.Subject = d.short_description;                 c.ServiceNowId__c = d.sys_id;                 c.Origin = d.contact_type;                  casesToUpsert.add(c);          }         system.debug('Cases to UPsert ::: ' +casesToUpsert);          if(casesToUpsert.size()&gt;0){             Database.upsert(casesToUpsert,false) ;         }              }  }   How to work my scheduled class perfectly running for every 15 mins and pulling the records from external source?
14400
Using the salesforce GUI it seams impossible to schedule a job every 15 minutes. Or more than once a day.
6182
I have written the following batch apex class and corresponding test class. Tests are successful but the execute method is never called. I have attempted to debug to try to pinpoint the problem but have had no luck.   Batch Class  global class BatchAddToCampaign implements Database.Batchable&lt;sObject&gt;,  Database.Stateful {     global final Id campaignId;     global final Set&lt;Id&gt; qKeys;      global BatchAddToCampaign(Id campaignId, Set&lt;Id&gt; qKeys){         this.campaignId = campaignId;         this.qKeys = qKeys;     System.Debug('this.campaignId is ' + campaignId);              System.Debug('this.qkeys is ' + qKeys);                       }      global Database.QueryLocator start(Database.BatchableContext BC) {         return Database.getQueryLocator('Select Id From Lead Where Id In :qKeys');     }      global void execute(Database.BatchableContext BC, List&lt;Lead&gt; scope) {         System.Debug('Starting Execute Method!');                  Integer collsize;          List&lt;CampaignMember&gt; cm = new List&lt;CampaignMember&gt;();            Map&lt;Id, Campaign&gt; cmMap = new Map&lt;Id, Campaign&gt;([Select (Select LeadId From CampaignMembers) From Campaign c Where Id = :campaignId]);          for(Lead myLeads : scope) {              CampaignMember newCM = new CampaignMember(              CampaignId = campaignId,              LeadId = myLeads.Id,              status = 'Added' );                   if (!cmMap.containsKey(myLeads.Id)) {                      cm.add(newCM);                       collsize = cm.size();                  }          }           try {              Database.insert(cm);           } catch (DmlException ex) {             System.Debug('Insert failed ' + ex);          }             }      global void finish(Database.BatchableContext BC) {         AsyncApexJob a = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed,  TotalJobItems, CreatedBy.Email From AsyncApexJob Where Id = :BC.getJobId()];         // Send an email to the Apex job's submitter notifying of job completion.         Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();         String[] toAddresses = new String[] {a.CreatedBy.Email};         mail.setToAddresses(toAddresses);         mail.setSubject('Add to Campaign ' + a.Status);         String campaignURL = URL.getSalesforceBaseUrl().toExternalForm() + '/' + campaignId;         mail.setPlainTextBody('The batch Apex job processed ' + a.TotalJobItems + ' batches with '+ a.NumberOfErrors + ' failures. ' + 'Link to Campaign: ' + campaignURL);         Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });     } }   Test Class  @isTest public class BatchAddToCampaignTest {     static testMethod void testMethod1()     {         List&lt;Lead&gt; lstCM= new List&lt;Lead&gt;();         for(Integer i=0 ;i &lt;1;i++){             Lead myLead = new Lead();             myLead.Id = '00Q1U00000KqFcDUAV';             lstCM.add(myLead);             Integer collSize = lstCM.size();              System.debug('List Collection Size is ' + collSize);                 {                  System.debug('Start Set');                 Set&lt;Id&gt; leadIds = (new Map&lt;Id,SObject&gt;(lstCM)).keySet();                 System.debug('End Set');                 Integer collSizeSet = leadIds.size();                  System.debug('Set Collection Size is ' + collSizeSet);                 Id workingCampaignId = '7011U000000RWRAQA4';                  Test.startTest();                  //BatchAddToCampaign ba = new BatchAddToCampaign(workingCampaignId, leadIds);                 DataBase.executeBatch(new BatchAddToCampaign(workingCampaignId, leadIds));                  Test.stopTest();                   }             }      } }
67965
I have written a class to calculate business hours for Case age in business hours.  The class works great my issue is when trying to write decent test code for the class.  In following testing best practices, I want to create all my own test data and not rely on existing data (seeAllDate=true).  I would assume that in order to test my different scenarios I would need to create and insert new business hours.  Normally, I would use something like the snippet below  BusinessHours newHours = new BusinessHours(     MondayStartTime = Time.newInstance(9, 0, 0, 0),     MondayEndTime = Time.newInstance(17, 0, 0, 0),     TuesdayStartTime = Time.newInstance(9, 0, 0, 0),     TuesdayEndTime = Time.newInstance(17, 0, 0, 0),     WednesdayStartTime = Time.newInstance(9, 0, 0, 0),     WednesdayEndTime = Time.newInstance(17, 0, 0, 0),     ThursdayStartTime = Time.newInstance(9, 0, 0, 0),     ThursdayEndTime = Time.newInstance(17, 0, 0, 0),     FridayStartTime = Time.newInstance(9, 0, 0, 0),     FridayEndTime = Time.newInstance(17, 0, 0, 0),     IsActive = true,     IsDefault = true ); insert newHours;   However, you cannot perform DML on business hours.  Is there a way to do this without having to use seeAllData=true?  I have searched and searched but can;t find much info on using the business hours class in test code.  Any help is much appreciated.
60323
My first post,pretty excited.I want to make a soap api call which insert multiple records. I am using 2 different salesforce instances. destination side  global with sharing class SoapDemo1 {    global class AccountWrapper    {       webservice string Name;       AccountWrapper(Account a)       {         this.Name=a.Name;       }    }     webservice static List&lt;Account&gt; CreateMultipleAccounts(List&lt;Account&gt; accs)    {        List&lt;Account&gt; FinalList=new List&lt;Account&gt;();         for(Account a:accs)        {           Account a1=new Account();           a1.Name=a.Name;            FinalList.add(a1);           }         if (FinalList.size() &gt; 0)        {           Database.Insert(FinalList);        }         return FinalList;     }     }   I generated the class wsdl file and also partner wsdl file  ****source side:**** I upload the class wsdl file generated from destination, when I parse no errors, but when I click Generated Apex code, it shows error as:     Unable to find complexType for   {}anyType    I changed anyType to string and again repeated the process but it shows error as:     Unable to find complexType for   {}JunctionIdListNames   Please help me out
8665
I am trying to copy records from one org to other via web services. I am calling a class which has logic written into a trigger. But @ future method is not taking sObject  list as a parameter. Can someone suggest me an alternative?  The Code:  public class webServicesTriggerClass   {     @future public static void webServicesMethod(list&lt;MyFriend__c&gt; mfList)     {         partnerSoapSforceCom.Soap sp = new partnerSoapSforceCom.Soap();       partnerSoapSforceCom.LoginResult lr = sp.login('hitesh.kumar.singh@accenture.com.varun','4Rajyavardhan');      soapSforceComSchemasClassNiralaapp.SessionHeader_element ses = new soapSforceComSchemasClassNiralaapp.SessionHeader_element();      ses.sessionId = lr.sessionId;       soapSforceComSchemasClassNiralaapp.MyFriendsDetailSoapApi vNapp=new soapSforceComSchemasClassNiralaapp.MyFriendsDetailSoapApi();      for(MyFriend__c mf:mfList)       {        string  s1= mf.myEmail__c;        string  s2=mf.friendName__c;         string  s3=mf.friendEmail__c;        string  s4=mf.aboutFriend__c;        integer i1=Integer.ValueOf(mf.age__c);        boolean result=vNapp.addFriendDetails(s1,s2,s3,s4,i1);        system.debug('################' +result);           }     }    }     Trigger-->  trigger webServicesTrigger on MyFriend__c (after insert)     {      webServicesTriggerClass.webServicesMethod(trigger.new);    }     Error--    Error: Compile Error: Unsupported parameter type LIST at line 3 column 30
93759
I have  a  requirement where a future method need to be called from batch apex ,I came across various articles stating that a future method could not be called from the batch. Is there any alternate solutions for that?
83603
I have rejected Workflow Rules, since email alerts can't be sent at the exact same time every week. I have rejected schedulable Reports/Dashboards since emails can't be sent to email fields of records and the email content can't be customized.   What are the Apex topics I should look into, to send weekly emails (every Monday) to email-fields of records of a custom object? Can you provide me with code snippets?
25839
Error Message:     Developer script exception from Nicomatic : quotepotential :   quotepotential: execution of AfterUpdate caused by:   System.DmlException: Update failed. First exception on row 0 with id   a0Q90000005PoxtEAC; first error: UNABLE_TO_LOCK_ROW, unable to obtain   exclusive access to this record: [] Trigger.quotepotential: line 14,   column 1      Apex script unhandled trigger exception by user/organization:   00590000001A6jh/00D90000000bovq      quotepotential: execution of AfterUpdate      caused by: System.DmlException: Update failed. First exception on row   0 with id a0Q90000005PoxtEAC; first error: UNABLE_TO_LOCK_ROW, unable   to obtain exclusive access to this record: []      Trigger.quotepotential: line 14, column 1   these mails are getting to my mail..........  trigger quotepotential on Quote_Line_Item__c (after insert,after update) {     Set&lt;Id&gt; quoteIds = new Set&lt;Id&gt;();     List&lt;Quote__c&gt; quotes = new List&lt;Quote__c&gt;();     for (Quote_Line_Item__c record: Trigger.new) {         if (record.Quote1__c != null){             quoteIds.add(record.Quote1__c);         }     }     for(AggregateResult ar:[                 SELECT                      Quote1__c,                      SUM(Max_Batch__c)sumMax                  FROM Quote_Line_Item__c                  WHERE Quote1__c=:quoteIds                  GROUP BY Quote1__c                 ]) {          quotes.add(new Quote__c(              Id=(Id) ar.get('Quote1__c'),              Potential__c = (Decimal) ar.get('sumMax')              ));     }     if (quotes.isempty() == false) {         update quotes;     } }
110621
For the last years I expected all async Apex means not to run in tests when there is no Test.stopTest() in my test code.  But now I have a test without this call and a future method is called.  I thought Test.stopTest() is forcing all async Apex to run instantely.   How does it really work, when do I need Test.stopTest()? Is this also true for Batch?
67689
Is there a way to pass a parameter into a schedulable class execute method? We were trying to pass a string from another scheduled class into this scheduled class but it looks like we can't do that?  As quick context we have the scheduled date and time as a record in a custom object so we are trying to pass that info into our scheduled class.  global class MturkVSSchedule implements Schedulable{      global void execute(SchedulableContext SC, **String s**){   Putting String S throws a compile error. Is there a different way that I'm missing?
50659
I am trying to deploy around 80 Components which include Apex Class,Trigger and Visualforce Pages. But it is failing due to below exception,     MyTrigger: execution of BeforeInsert caused by: System.QueryException: Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch Trigg...   All test classes are run as a part of deployement process hence few of the test classes are making this trigger fire causing error. As its a change set deployment error, could not get the complete error statement. Also my trigger includes below code.  if(trigger.isBefore &amp; trigger.isInsert) {         for(AggregateResult ar : [select ABC__c, Name, max(Revision__c) maxRev from XYZ__c                                      where ABC__c in :oppMap.keySet()                                     group by ABC__c, Name order by ABC__c, Name]) {             decimal maxRev = Integer.valueOf(ar.get('maxRev'));             string oppAppKey = String.valueOf(ar.get('ABC__c')) + String.valueOf(ar.get('Name'));             lrMap.put(oppAppKey, maxRev);         }     }   Let me know how to fix this. Should i try using limit or is there any other solution?
83646
I'm attempting a mass update on Contacts via Execute Anonymous. My code gives me the following error:     System.LimitException: Apex CPU Time Limit Exceeded   Here's my code:  List &lt;Contact&gt; contactList = [select Id, Mass_Update_Checkbox__c from Contact Limit 1000];  for (Contact contact : contactList) {     contact.Mass_Update_Checkbox__c = TRUE;  }  update contactList;
122637
I'm working on a SharePoint app where I need to run SP.RequestExecutor.executeAsync() in order to grab some information from one of the Host Web's lists. Depending on what method is calling the oData call I want to do something different.   Unfortuntely, executor.executeAsync() isn't playing as nice as $.ajax() does in terms of using $.when().done() and executing code after an async call is made. Below is some code if you'd like to see:      load = function (){         $.when(getEntries()).done(function () {             ViewModels.Calendar.addEventSource(ko.utils.unwrapObservable(eventList));         });     }      getEntries = function () {         return executor.executeAsync({             url: appweburl                 + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('" + LIST + "')/items?@target='" + hostweburl                 + "'&amp;$select=Title,OData__x006e_ot5,qnlu,OData__x0066_x20"                 + "&amp;$filter=OData__x0066_x20 eq '" + ViewModels.Person.user.userName() + "' "                 + "and qnlu ge DateTime'" + startDate().toString("yyyy-MM-dd") + "T00:00:00' "                 + "and qnlu le DateTime'" + endDate().toString("yyyy-MM-dd") + "T00:00:00' ",             method: "GET",             headers: { "Accept": "application/json; odata=verbose" },             success: onGetEntriesSuccess,             error: onoDataCallFailure          });     },      onGetEntriesSuccess = function (data) {         var jsonObject = JSON.parse(data.body);         $.each(jsonObject.d.results, function (index, item) {             eventList.push(new Event(item.qnlu, item.OData__x006e_ot5));         });     },      onoDataCallFailure = function (data, errorCode, errorMessage) {         alert('Failed to get host site. Error:' + errorMessage);     };   Any ideas/suggestions would be appreciated.
110175
I am receiving an error stated above on line 26**(listAccount1)**, can anyone guide me on how to solve it?  public class FRB_UpdateExceptionsforBatch {    public static void FRB_Exceptions(){    string FRBRecordTypeID = utility.getFRBProfileNameLabel();       List&lt;Account&gt; lstAccount = new List&lt;Account&gt;();         List&lt;Account&gt; lstAccount1 = new List&lt;Account&gt;();         List&lt;Account&gt; lstAccount2 = new List&lt;Account&gt;();         List&lt;Account&gt; lstAccount3 = new List&lt;Account&gt;();    lstAccount = [Select id,FRB_Firm_Check__c,Number_of_Exception__c,Number_of_exceptions_under_4_6_bucket__c,Number_of_exceptions_under_7_10_bucket__c,Number_of_exceptions_under_11_19_bucket__c,(select id,Account_Standing__c from Process_Adherence_Monitoring__r  where Status__C != 'Closed' AND  recordtypeId =: FRBRecordTypeID AND Account_Standing__c = '0-3 Days (Green - New Exception)' ) FROM Account WHERE FRB_Firm_Check__c = TRUE];     if(lstAccount.size()&gt;0){           for( Account acc : lstAccount )           {               List&lt;Process_Adherence_Monitoring__c&gt; lstCont = acc.Process_Adherence_Monitoring__r;                acc.Number_of_Exception__c = lstCont.size();               acc.FRB_Firm_Check__c = true;           }            update lstAccount;     }         //To update 4-6 bucket      lstAccount1 = [select Id, Name,FRB_Firm_Check__c, Number_of_exceptions_under_4_6_bucket__c,(select id,Account_Standing__c from Process_Adherence_Monitoring__r  where Status__C != 'Closed' AND  recordtypeId =: FRBRecordTypeID AND Account_Standing__c = '4-6 Days (Yellow - Outside Correction Timeframe)' ) from Account where FRB_Firm_Check__c = TRUE];        if(lstAccount1.size()&gt;0){           for( Account acc : lstAccount1 )           {               List&lt;Process_Adherence_Monitoring__c&gt; lstCont1 = acc.Process_Adherence_Monitoring__r;                              acc.Number_of_exceptions_under_4_6_bucket__c= lstCont1.size();               acc.FRB_Firm_Check__c = true;           }            update lstAccount1 ;       }         //To update 6-11 bucket         lstAccount2 =  [select Id, Name,FRB_Firm_Check__c, Number_of_exceptions_under_7_10_bucket__c,(select id,Account_Standing__c from Process_Adherence_Monitoring__r  where Status__C != 'Closed' AND  recordtypeId =: FRBRecordTypeID AND Account_Standing__c = '7-10 Days (Orange - Approaching Critical Timeframe)' ) from Account where FRB_Firm_Check__c = TRUE];        if(lstAccount2.size()&gt;0){           for( Account acc : lstAccount2 )           {               List&lt;Process_Adherence_Monitoring__c&gt; lstCont2 = acc.Process_Adherence_Monitoring__r;                acc.Number_of_exceptions_under_7_10_bucket__c= lstCont2.size();               acc.FRB_Firm_Check__c = true;           }           update lstAccount2 ;       }        //To update 11 bucket            lstAccount3 =  [select Id, Name,FRB_Firm_Check__c, Number_of_exceptions_under_11_19_bucket__c,(select id,Account_Standing__c from Process_Adherence_Monitoring__r  where Status__C != 'Closed' AND  recordtypeId =: FRBRecordTypeID AND Account_Standing__c = '11-19 Days (Red - Immediate Correction Required)' ) from Account where FRB_Firm_Check__c = TRUE];        if(lstAccount3.size()&gt;0){           for( Account acc : lstAccount3 )           {               List&lt;Process_Adherence_Monitoring__c&gt; lstCont3 = acc.Process_Adherence_Monitoring__r;                acc.Number_of_exceptions_under_11_19_bucket__c= lstCont3.size();               acc.FRB_Firm_Check__c = true;           }                              update lstAccount3 ;       }      }   }
44999
I am trying to write a test class for the Apex Class with try - catch block and this is my first time coding test classes. The Apex Class is like below which has trycatch   public class updateCaseRecord {          @AuraEnabled     public static void updateCheck(String caseId){         String msg = '';         try         {         List&lt;Case&gt; records = [select id,Status from Case WHERE Id = :caseId];         for (Case record : records)         {             record.Status = 'Closed';         }         update records;          }         catch(DmlException e)              {                for (Integer i = 0; i &lt; e.getNumDml(); i++) {                     msg =+ e.getDmlMessage(i) +  '\n' ;                     System.debug('getDmlFieldNames=' + e.getDmlFieldNames(i));                    System.debug('getDmlMessage=' + e.getDmlMessage(i));                   }                 throw new AuraHandledException(msg);             }             catch(Exception e)             {             throw new AuraHandledException(e.getMessage());             }             finally { }           }}   And I wrote my test class like   @IsTest public class updateCaseRecordTest { @IsTest static void testIsUpdateCheck() {      ID parentRecType = '012U0000000PqA9IAK';     ID csRecType     = '012U0000000QGv4IAG';       Account pa = new Account(Name='Test Parent Account', recordTypeId=parentRecType);     insert pa;      Account testAccount = new Account(Name='test', Industry='Biotech',Territory__c='EUR',BillingCity='Test',BillingCountry='Germany',ParentId=pa.id);     insert testAccount;       Contact c = new Contact(LastName='Test',LeadSource='Customer Service',AccountId=testAccount.Id);     insert c;      Case newCase1 = new Case();     newCase1.Subject = 'testStatusClosed';     newCase1.Status = 'New';     newCase1.Category__c = 'Inquiry';     newCase1.Sub_Category__c = 'Other';     newCase1.AccountId = testAccount.Id;     newCase1.ContactId = c.id;     newCase1.recordTypeId=csRecType;     insert newCase1;       Test.startTest(); try     {     updateCaseRecord.updateCheck(newCase1.Id);     List&lt;Case&gt; lCases = [SELECT Id,Status,OwnerId FROM Case WHERE Id =: newCase1.Id];     System.assertEquals('Closed', lCases[0].Status);      System.assertEquals(UserInfo.getUserId(), lCases[0].OwnerId);     }      catch(DMLException e) {         System.assertEquals(e.getMessage(), e.getMessage());     }      Test.stopTest();    }}   I thought I captured the try catch but when I run the test class it has only 57% code coverage and shows like below    Following one of the answers here
21717
I want to run a job every 3 seconds, however in SQL Server 2008 we cannot define an interval of less than 10 seconds.  The job is used to insert/update visitor information, and segmentation information into a database which is tracked by google search.   There are up to about 100 rows inserted in a 2 or 3 seconds. That job inserts and update the table in a database. Is there any way to schedule it using sp job scheduling configuration?
86786
I have a problem with my trigger. In Sandbox, everything works fine. When I deploy it to production, I receive multiple exceptions - which is really strange, because I got angry and put the whole code in &quot;try&quot; block. When I put everything in &quot;try&quot; block, it shouldn't be possible not to catch an exception! This is how my code looks: trigger UpdateLeadField on Lead (before insert, before update) {      //debugging in progress     try{         if(Trigger.New[0].SomeField__c==NULL)         {             for(Lead obj: trigger.new)                 obj.SomeField__c = obj.OwnerId;             return;         }              if (Trigger.New[0].OwnerId != Trigger.Old[0].OwnerId)          {             for(Lead obj: trigger.new)             {                 if(Trigger.New[0].SomeField__c==NULL || [SELECT Name FROM UserRole Where Id = :[SELECT Id, UserRoleId FROM User WHERE Id = :obj.OwnerId][0].UserRoleId].Name == 'Some role')                 obj.SomeField__c = obj.OwnerId;             }         }     }     catch (Exception e)     {         System.debug(e);     } }  The main problem seems to be with Web-to-Lead - When deployed, it stops working. The exception:  Apex script unhandled trigger exception by user/organization: 005C00000XXXXXX/00XXXXX0000LXXQ UpdateLeadField: data changed by trigger for field Some field: id value of incorrect type: 00GC00000XXXXXqMAC  &quot;Some field&quot; is a lookup field.