• pavan 14
  • NEWBIE
  • 29 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 3
    Replies
User-added image

Reference Upvoting Success Link:

https://success.salesforce.com/issues_view?id=a1p3A0000018BUcQAM

how to reslove this error?
Platform Developer I Certification Maintenance (Summer '19)  Challenege code
********************************************************************************
Modify an existing batch Apex job to raise BatchApexErrorEvents

Take an existing batch Apex job class and update it to implement the Database.RaisesPlatformEvents interface. Then, add a trigger on BatchApexErrorEvent that logs exceptions in the batch job to a custom object.
Update the BatchLeadConvert class to implement the Database.RaisesPlatformEvents marker interface.

Create an Apex trigger called BatchApexErrorTrigger on the BatchApexErrorEvent SObject type. For each event record, capture the following fields and save them to the corresponding fields in a new BatchLeadConvertErrors__c record.
AsyncApexJobId: AsyncApexJobId__c
JobScope: Records__c
StackTrace: StackTrace__c
To make the trigger bulk safe, use a single DML statement to insert a list of new records at the end.
****************************************************************



trigger BatchApexErrorTrigger on BatchApexErrorEvent (after insert) {
    
   list<BatchLeadConvertErrors__c> bcr= new List<BatchLeadConvertErrors__c>();
    
    for(BatchApexErrorEvent event: trigger.new){
        
        BatchLeadConvertErrors__c  evrterror= new BatchLeadConvertErrors__c ();
        
        evrterror.AsyncApexJobId__c= event.AsyncApexJobId;
        evrterror.Records__c=event.JobScope;
        evrterror.StackTrace__c=event.StackTrace;     
        bcr.add(evrterror);    
    }
    
    if(bcr.size()>0){
        
        insert bcr;
    }

}

*************************************************************
BatchLeadConvert Apex Batch Class

public with sharing class BatchLeadConvert implements Database.Batchable<SObject>, Database.RaisesPlatformEvents{

// Not be bothered whats here. Just Implement Raises Platform Events Interface.
}

 
Need help while using sublime its locking the org while i save any classes or pages[ till saving time period of classes its locking org] . its locks the entire org.

can anyone suggest alternate approach or how to disable that feature.
Hi,

can anyone give me the soql query to fetch records genrated on 1st of every month.

Regards
Pavan.
could any one explain even though i wrote standard controlller 
 <apex:page standardController="japan__c" recordSetVar="jap">
    <apex:dataTable value="{!jap}" var="a">
        <apex:column value="{!a.name}" />
    </apex:dataTable>
</apex:page>
User-added image
i am unable to see Visualforce in page layout. do i need enable anything in specific . 
Getting error "Error: Incorrect parameter type for operator '-'. Expected Number, DateTime, received Date". while creating workflow rule checking condition forcustom object feild Created date and implement the rule only during mon.tue,wed,thurs,fri using CASE function.please help or correct

CASE(
MOD(  CreatedDate - DATE( 1900, 1, 7 ), 7 ),

1, "Monday",
2, "Tuesday",
3, "Wednesday",
4, "Thursday",
5, "Friday",
"None"
)
Platform Developer I Certification Maintenance (Summer '19)  Challenege code
********************************************************************************
Modify an existing batch Apex job to raise BatchApexErrorEvents

Take an existing batch Apex job class and update it to implement the Database.RaisesPlatformEvents interface. Then, add a trigger on BatchApexErrorEvent that logs exceptions in the batch job to a custom object.
Update the BatchLeadConvert class to implement the Database.RaisesPlatformEvents marker interface.

Create an Apex trigger called BatchApexErrorTrigger on the BatchApexErrorEvent SObject type. For each event record, capture the following fields and save them to the corresponding fields in a new BatchLeadConvertErrors__c record.
AsyncApexJobId: AsyncApexJobId__c
JobScope: Records__c
StackTrace: StackTrace__c
To make the trigger bulk safe, use a single DML statement to insert a list of new records at the end.
****************************************************************



trigger BatchApexErrorTrigger on BatchApexErrorEvent (after insert) {
    
   list<BatchLeadConvertErrors__c> bcr= new List<BatchLeadConvertErrors__c>();
    
    for(BatchApexErrorEvent event: trigger.new){
        
        BatchLeadConvertErrors__c  evrterror= new BatchLeadConvertErrors__c ();
        
        evrterror.AsyncApexJobId__c= event.AsyncApexJobId;
        evrterror.Records__c=event.JobScope;
        evrterror.StackTrace__c=event.StackTrace;     
        bcr.add(evrterror);    
    }
    
    if(bcr.size()>0){
        
        insert bcr;
    }

}

*************************************************************
BatchLeadConvert Apex Batch Class

public with sharing class BatchLeadConvert implements Database.Batchable<SObject>, Database.RaisesPlatformEvents{

// Not be bothered whats here. Just Implement Raises Platform Events Interface.
}

 
could any one explain even though i wrote standard controlller 
 <apex:page standardController="japan__c" recordSetVar="jap">
    <apex:dataTable value="{!jap}" var="a">
        <apex:column value="{!a.name}" />
    </apex:dataTable>
</apex:page>
User-added image
i am unable to see Visualforce in page layout. do i need enable anything in specific . 
Hi,

can anyone give me the soql query to fetch records genrated on 1st of every month.

Regards
Pavan.
could any one explain even though i wrote standard controlller 
 <apex:page standardController="japan__c" recordSetVar="jap">
    <apex:dataTable value="{!jap}" var="a">
        <apex:column value="{!a.name}" />
    </apex:dataTable>
</apex:page>
User-added image
i am unable to see Visualforce in page layout. do i need enable anything in specific .