
I have a dilema, and hope someone could help me figure out the solution:
Is there a way to create a field, that automatically updates whenever a new record is created?
For example, I have an Account and I have multiple Opportunities. I want to create a custom filtered view on Opportunities that would only show only one, most recent Opportuinity per Account.
Any thoughts?
Thank you!
1 réponse
Create a Roll up summary field on the Account page.
Go to the Setup page...App Setup...Customize...Accounts...Fields
Click on the New button to create a new custom field.
Select "Roll-Up Summary" as the data type.
Name the field.
Select "Opportunities" as the summarized object.
Select "Count" as the roll-up type.
Set any desired filters. (ex. count only closed-sold opps).
Add to your Account page and Save.
This field will now be available in your reports or you can create an opportunity custom field that references it.
Or
Hope the below link helps to solve your query
https://help.salesforce.com/apex/HTViewSolution?urlname=How-to-run-a-report-to-show-only-the-most-recent-opportunity-this-will-also-work-for-any-other-object-where-there-is-a-master-detail-relationship-1327108632107&language=en_US
Hope this helps
Regards
Sachin