I want to add Amount field of Opportunity on custom object field.

Objects- Opportunity, Sector Target. Fields- Amount on both objects Currency(16,2).

Criteria - If Opportunity Stage = Closed Won.

I want Sector_Target__c.Amount = Sector_Target__c.Amount + Opportunity.Amount

I tried with process builder but failed.

  • are these two objects related? You may have to write a trigger or call an apex class from the process builder – coderdecoder Dec 4 '19 at 6:56

As the first comment mentions, you need to assess if these two Objects are related. It sounds like every Opportunity should be related to a Sector Target? If so, is there a lookup on Opportunity to Sector Target? If yes, then this is possible using a Process Builder Field Update. If not, then you need to create the relationship (Lookup field) and populate it on each Opportunity. At which point, your next question may well be 'how do I assign an Opportunity to a specific Sector Target?'. For this, you'll likely need a complex Flow/ code.

| improve this answer | |
  • There's a lookup for Sector Target on opportunity. It should be like everytime the amount on opportunity is added it should be added to sector targets amount field in addition to the existing. Irrespective of particular record – Pranil Sarode Dec 4 '19 at 9:48
  • Then this is achievable using Process Builder. When Opportunity.Amount changes, increment Opportunity.SectorTarget__r.Amount__c. Are you familiar with Process Builder? If not, please consider completing the Trailhead module. Also bear in-mind that Process Builder is more of an admin tool than a dev tool, so you're likely to get a better response on other forums rather than StackExchange. – Dan Wareing Dec 4 '19 at 9:56

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.