2 answers
Ok....I have this as a trigger on opportunity to create a quote once my auto opp is created: -trigger QuoteCreate on Opportunity (after insert) { List<Id> oppIdsList = new List<Id>(); List<Quote> quoteList = new List<Quote>(); for (Opportunity o : Trigger.new) { if(o.FME_AMC_Renewal__c == True) oppIdsList.add(o.id);} Opportunity[] oppList = [SELECT name, id, account.billingStreet, account.billingCity, account.billingState, account.billingCountry FROM Opportunity WHERE id IN :oppIdsList]; for (Opportunity o : oppList) { Quote q = new Quote(); q.name = o.name; q.opportunityId = o.id; q.billingStreet = o.account.billingStreet; q.billingCity = o.account.billingCity; q.billingState = o.account.billingState; q.billingCountry = o.account.billingCountry; quoteList.add(q); } insert quoteList;}How Do I write one to copy the Opportuntiy line items over to be quote line items and thne how on earth do I create a pdf from this?