You need to sign in to do that
Don't have an account?

Get record from a List based on current record being updated
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'
Thanks,
P
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
Your query is correct, just make use of FOR loop in-case no result returned it will not hit an error.
Thanks,
Gaurav
Skype: gaurav62990
So how do I grab a record from the list based on the current record being update?
The list right now is grabbing all of the records in teh org that meet that criteria. In a nother method I would like to go through the list and grab field(s) from teh lsit based on the current record being updated.
Thanks you,
P
https://www.walgreenslistens.mobi/