• Thomas Panni 6
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    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
Hi guys can you please help me to write a Trigger to Auto create child Record when new parent record is created 
I have custom Object as Order__c and I have it's child Object asTax Details__c. I have a lookup field of Account and Country__c Picklist Custom Field on Tax Details Object . So I want whenever a new Order is created then a new Tax Details record should be created with Order Number, Account Name and Country. Order Number will be Parent Account (Order_c) number, Account Name will be same as Account Name on Order__c (Lookup of Account on Order__c Object) and Country should be same as we have Country on Order__c Object.
Thanks in advance 
  • February 13, 2015
  • Like
  • 0