• AJAY SINGH 68
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,

I have 2 objects Object A and Object B

Object B has a lookup to object A.

Object A has three fields  Aname , BNmber and ASales

Bnumber is a code and can have several values against it.

Bnumber 123        ASales 100

Bnumber 123        ASales 300

Bnumber 123        ASales 500

I need help in writting trigger on object B, that pulls sum of Asales against Bnumber ( 900 against 123 in this case) 

The sum of Asales against Bnumber should be stored in a field on Object B...

Post that I can rollup this object to Opportunity(master) and then the actual sales will appear on the opportunity