Skip to content

Instantly share code, notes, and snippets.

@nommy
Created June 12, 2012 05:30
Show Gist options
  • Save nommy/2915338 to your computer and use it in GitHub Desktop.
Save nommy/2915338 to your computer and use it in GitHub Desktop.
fuga apex
trigger HandleProductPriceChange on Merchandise__c (after update) {
// update invoice line items associated with open invoices
List<Line_Item__c> openLineItems =
[SELECT j.Unit_Price__c, j.Merchandise__r.Price__c
FROM Line_Item__c j
WHERE j.Invoice_Statement__r.Status__c = 'Negotiating'
AND j.Merchandise__r.id IN :Trigger.new
FOR UPDATE];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment