0

We have two different Opportunity record types that can be associated to each account. Opportunity record type A has a total amount in it. Opportunity records type B will be entered with smaller amounts. I need to create a field/fields on the account record that inserts the amount of opportunity record type A and then subtracts the amounts of opportunity records type B as they are created.

  • 1
    did you try roll up summary fields and then a formula field that subtracts the two? – cropredy Feb 10 '16 at 21:28
  • You can try creating workflow rules that fire depending on the RT and perform "Edit Field" actions on associated accounts. I have not made this into an answer because I am not 100% sure if you can update the account record from an Oppty workflow rule. If this works for you, let me know and I'll type my text into an answer you can accept. – Sebastian Kessel Feb 10 '16 at 22:06
  • Scratch my answer above. @crop1645 's is better – Sebastian Kessel Feb 10 '16 at 22:09
  • @crop1645 You really should just go ahead and add that as the answer, becuase you know you're right. – sfdcfox Feb 10 '16 at 22:11
  • @sfdcfox -- LOL ; I'm not always right -- as you well know when you catch me out :-) – cropredy Feb 10 '16 at 22:15
1

On Account, create two RSF fields

RecordTypeA_RSF__c = SUM of Opportunities of record type A amount

RecordTypeB_RSF__c = SUM of Opportunities of record type B smallerAmount__c

Then create a formula on Account

A_versus_B_Diff__c = RecordTypeA_RSF__c - RecordTypeB_RSF__c

Of course, use better field names than I used to match your domain

You are limited in the number of RSF fields OOB, but you can request more from SFDC Support if you run out

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.