• sebastiangnagnarella
  • NEWBIE
  • 70 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies

Hi,

 

I've got a batch job that works well in manual testing, processing multiple records in each batch without any issues. However my unit test fails if I set the scope greater than just 1 record with a "System.UnexpectedException: Error processing messages". I'm stumped, does anyone know what this cryptic exception means?

 

Thanks a lot,

Mike

Can u please tell me the diff btn Iterable and Database.Querylocator() in Batch apex?

Just tell me few words.

 

Thanks

below is the code that i have tried to do the cloning.

 

Account acc=new  Account(Name='ACC');
insert acc;
Opportunity CloneOpp= new Opportunity(Name='CloneOpp',AccountId=acc.id,Amount=222,StageName='xyz',CloseDate=System.today(),h1newContractEndDate__c=System.today());
 insert CloneOpp;

 Opportunity colned=CloneOpp.clone(true,false);
      
        
  system.debug('*Id=*'+colned.id);
  system.debug('source id='+CloneOpp.id);
 system.debug('*name*'+colned.Name);
  system.debug('opp='+CloneOpp.Name);


     colned.Name='TestNew';

   system.debug('*name after update*'+colned.Name);
   system.debug('Source opp Name='+CloneOpp.Name);//this should be print TestNew but it prints CloneOpp

 

apex guide says-" If "opt_IsDeepClone" argument set to false, the method creates a reference to
the original sObject. Consequently, if you make changes to a field on the cloned sObject, the original
sObject is also affected".

 

 

please guide if any one has answer of this ..

I've created a master-detail relationship field on a custom child object, looking to a custom parent object. When I create the child record, of course the master-parent record is required, and I'm then able to save the child record.

 

But once the child record has been saved, the master-detail lookup field to the parent record is now locked - I'm unable to edit the master-parent record, even though I had edit read-only field rights.

 

Any ideas would be great, thanks!

Hi everybody,

 

I'm working on a new trigger in the UPDATE event and we need to identify specifically which fields of that object have changed its values. I know there is a comparison between trigger.new and trigger.old objects but as I can see, it is required to hardcode the field name to know what we are asking for.

 

Is it possible that catch that behavior dynamically? 

 

Regards,

 

Wilmer