You need to sign in to do that
Don't have an account?
Dave Hamburg
Bulkify question
Trying to bulk up this method and struggling with the map concept. The Agreement__c has a related list called Facilities_Covered__c, It also has a related Modification__c and when it is created I am building a junction object between it and the Facilities (account). How can i create the group of related items?
public void setrelatedFC() { List<Modifications_Facilities_Covered__c> newFC = new List<Modifications_Facilities_Covered__c>(); for (Modification__c newmods : newModifications.values()) { Modifications_Facilities_Covered__c fc = new Modifications_Facilities_Covered__c(); list<Facilities_Covered__c> fac = [select Facility__c from Facilities_Covered__c where Agreement__c = :newmods.Agreement__c]; for(Facilities_Covered__c f : fac ) { fc.Modification__c = newmods.id ; fc.Facility__c = f.Facility__c; newFC.add(fc); } } insert newFC; }
Let us know if this will help you
All Answers
Let us know if this will help you