• mich kel
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello,
I was wondering.  What is the best way to get the record from a list based on the currecnt record.
For example I have this list where I am grabbing all the records where the ProjectT Name is 'Closed Templates'
cprojects = [SELECT Id, ProjectT__r.Name, Cand_Project__c,Cand__c 
                FROM Project__c WHERE  ProjectT__r.Name =: 'Closed Templates'];
In a nother method how can I grab the the record/field from the list based on the current record.  What I am trying to go is query all of the records that meet the criteria so that I only have to query it once in the class but need to be able to get a record from list based on the current record being updated.
Thanks,
P