You need to sign in to do that
Don't have an account?
Nick D'Addario
Generate Quote Document with Apex Trigger
I have a requirement to automatically generate a quote document once a quote's status is set to "In Review." I'm able to succesfully create the quote document record, but the actual document itself is not being generated. I also tried scheduling the MassQuoteDocumentSender class and had the same result. Here is what I have so far:
trigger createQuotePDF on SBQQ__Quote__c (after update) {
List<SBQQ__QuoteDocument__c> sr = new List<SBQQ__QuoteDocument__c>();
for (SBQQ__Quote__c q: Trigger.new)
if (q.SBQQ__Status__c== 'In Review'){
sr.add (new SBQQ__QuoteDocument__c(
SBQQ__Quote__c = q.Id,
SBQQ__Template__c = 'Standard Quote'
));
}
insert sr;
}
Any help would be greatly appreciated!
trigger createQuotePDF on SBQQ__Quote__c (after update) {
List<SBQQ__QuoteDocument__c> sr = new List<SBQQ__QuoteDocument__c>();
for (SBQQ__Quote__c q: Trigger.new)
if (q.SBQQ__Status__c== 'In Review'){
sr.add (new SBQQ__QuoteDocument__c(
SBQQ__Quote__c = q.Id,
SBQQ__Template__c = 'Standard Quote'
));
}
insert sr;
}
Any help would be greatly appreciated!