I have two standard objects
Quote
QuoteLineItem
Each Quote may have one/more QuoteLineItems or maynot have any QuoteLineItems.
Quote and QuoteLineItem are related with Master Detail Relationship. (Ranout of RollUp Summary Fields)
QuoteLineItem has a formula field(percent type) called Gross_Margin__C
.
Quote has a custom field called Minimum_Margin__C
.
I need a trigger on Quote(Parent) that will look at all of it's related QuoteLineItems(child records) Gross_Margin_c
and returns minimum Gross_Margin__c
on to the Quote record into the field Minimum_Margin_C
.
Thanks in Advance
Attribution to: amar4
Possible Suggestion/Solution #1
Take a look at the roll up summary via lookup fields from Antony Victorio:
http://www.anthonyvictorio.com/salesforce/roll-up-summary-utility/
I've used this a number of times when a master-detail relationship with a standard roll up summary hasn't been an option.
Attribution to: Bob Buzzard
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/32779