You need to sign in to do that
Don't have an account?
cnaranjo
SOQL and assigning values
Hello all,
I was wondering if this is possible with APEX code.
trigger NewCarEntry on Object (before insert) { List<Object> newEntry = [SELECT id, Name FROM Object WHERE Color__c = 'Red'AND Model__c ='Seat' LIMIT 1000]; //this is trigger and the list newEntry contains a number of items based Color__c and Model__c for (Object o: Trigger.new) { if(*/here is where I want to know how to look in the newEntry list and if it finds a record that match the criteria in that list, to update a number of fields on that new record/*
I was wondering if this is possible. Create a list (SQOL Query) based on a couple of fields and then use the IF statement to select those records that match the criteria on the list and update a number of fields on those records.
Can anyone help me with this?
Regards,
Carlos
Use of MAP<Key, Value> might help you.
Regards
San
www.santoshkumbar.com
All Answers
Use of MAP<Key, Value> might help you.
Regards
San
www.santoshkumbar.com
Thank you!
I will try that.
Regards,
Carlos