• Raoul
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi out there,
I an absolute Apex beginner and would like to solve a problem: Once an opportunity is closed won the products from that opportunity should automatically become assets for that customer. I know I need a trigger, a class and a test class. So in general my idea is as follows:

if opp stage = closed won
   and if opp has products
for each product (opp-line item) 
create asset
with account ID...
set asset name = product name

etc...

How can I solve this? Where could I find appropriate code samples? Any help is pretty welcome...
So thanks in advance...

best regards Thomas