• kundlik Yewale
  • NEWBIE
  • 20 Points
  • Member since 2016
  • Salesforce Developer
  • Zensar Technologies


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies

Challenge Not yet complete... here's what's wrong: 
We couldn't find a "Friends with Boats" tab. Make sure you've activated the page as a new tab in Lightning Experience and the Salesforce App.
Close errors
Hello All,
how to retrieve record id from map using custom filed.
List<String> lststringid =  new List<String>();
                for(Servicing_Error__c se : lstservicingerror)
                {
                    if(se.Fastrack_Work_Order__c != null)
                    {
                         lststringid.add(se.Fastrack_Work_Order__c) ;  
                    }   
                }
                Map<id,workOrder> mapWorkOrder = new Map<id,workOrder>([Select id,FAStrackIdentifier__c from WorkOrder where FAStrackIdentifier__c IN:lststringid]); 
                
                System.debug('Keyset'+mapWorkOrder);
                
                for(Servicing_Error__c se2:lstservicingerror)
                {
                    if(Se2.Fastrack_Work_Order__c != null)
                    {
                        System.debug('mapWorkOrder.get(se2.Fastrack_Work_Order__c).id'+mapWorkOrder.get(se2.Fastrack_Work_Order__c).id);
                         se2.Fastrack_Work_Order__c = mapWorkOrder.get(se2.Fastrack_Work_Order__c).id; 
                    }
                }


I am getting below error:
System.StringException: Invalid id: 23982178: External entry point
Visualforce Page:
<apex:page Controller="PdfGeneratorRedirectController" contentType="application/vnd.ms-excel#SalesForceExport.xls">
"Category","Date","Work Order Number","Pass / Fail"
 <apex:repeat value="{! lstscoring}" var="scring">
 "{!scring.Scoring_Category__c}","{!scring.CreatedDate }","{!scring.Work_Order__r.WorkOrderNumber}","{!scring.Pass_Fail__c}"
 </apex:repeat>
</apex:page>



Controller construcotrAfter Generation:

 lstscoring = new List<Scoring_Record__c>();
           lstscoring = [Select id,name,Scoring_Category__c,Vendor__r.name,Score__c,CreatedDate,Work_Order__r.WorkOrderNumber,Pass_Fail__c from Scoring_Record__c where Vendor__c ='001Z000001LlLGW'];
        System.debug('***** Construc'+ lstscoring +'stscr[0].Vendor__c') ;
Test class failing with below error:System.AsyncException: The Apex job named "Set Work Order auto assign job" is already scheduled for execution.

global void finish(Database.BatchableContext BC) 
    {
        min = Integer.valueOf(System.label.Work_Order_Auto_assignment);
        batchSize=Integer.valueOf(System.label.Batch_size_for_auto_assignment);
        System.scheduleBatch(this, 'Set Work Order auto assign job', min, batchSize);
    }
Hey Guys,

i want to create a simple list of task ordered by the last modified date of the parent record. It is no problem to the the account last modified date but i am unable to catch the last modified date of the lead object. It would be ok to seperate  it in to lists. 

Any solution for this ? 

Thanks for your help guys ! 
trigger leadDuplicatePreventer on Lead (before insert,after update) {
  list<lead> lead = new   list<lead>(); 
 for(lead a: trigger.new)
 {
lead=[select id,name,email from lead where email=:a.email];
  if(lead.size()>0)
  {
   a.email.adderror('email already exist');
  }
 }
}
  • February 01, 2019
  • Like
  • 0
Visualforce Page:
<apex:page Controller="PdfGeneratorRedirectController" contentType="application/vnd.ms-excel#SalesForceExport.xls">
"Category","Date","Work Order Number","Pass / Fail"
 <apex:repeat value="{! lstscoring}" var="scring">
 "{!scring.Scoring_Category__c}","{!scring.CreatedDate }","{!scring.Work_Order__r.WorkOrderNumber}","{!scring.Pass_Fail__c}"
 </apex:repeat>
</apex:page>



Controller construcotrAfter Generation:

 lstscoring = new List<Scoring_Record__c>();
           lstscoring = [Select id,name,Scoring_Category__c,Vendor__r.name,Score__c,CreatedDate,Work_Order__r.WorkOrderNumber,Pass_Fail__c from Scoring_Record__c where Vendor__c ='001Z000001LlLGW'];
        System.debug('***** Construc'+ lstscoring +'stscr[0].Vendor__c') ;
I'm new to salesforce, can you please tell me rough idea that how can I implement pagination?

Hi,

 

I have read the Apex concepts but I am not getting enough confidence in Apex coding, probably I need to practice more.

I was looking for Apex code examples/samples and use cases in google, but couldnt get any.

Can you please let me know if you have links to the Apex code examples/samples and use cases for Apex to try practicing.

 

Also for Apex classes and triggers, please let me know the following:

 

1. On which parts of Apex, I need to start for code practice and how to proceed further.

2. While practicing, what should be the areas that I need to practice more

3. What areas of Apex are commonly used

4. What areas of Apex are complex which needs more practice

5. How to frame the use cases myself for Apex code practice.

 

 

Thanks,

Priya.