• andersal
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 6
    Replies

Hi!

 

I am trying to create a wizard. I have copied the functionality in the tutorial in the VF Dev guide. My problem is that I can't navigate to the next page. I am only reloading the same page when I push the next button. Here is my code:

 

The controller:

 

public with sharing class newTOPPController {
    


   // These four class variables maintain the state of the wizard.  
    
   // When users enter data into the wizard, their input is stored  
    
   // in these variables.  
   String[] selectedName = new String[]{};
   Account account;
   Opportunity opportunity;
   OpportunityContactRole role;
   TOPP__c topp;
   Integer ant = -1;
   


   // The next four methods return one of each of the four class  
    
   // variables. If this is the first time the method is called,  
    
   // it creates an empty record for the variable.  
 
  public String[] getName() {
    return selectedName;
  }

  public void setName(String[] nameAccount) {
    this.selectedName = nameAccount;
  }

   public Integer getAntall()
   {
    return ant;
   }
   public void setAntall(Integer a)
   {
    this.ant = a;
   }
   public Account getAccount() {
      if(account == null) account = new Account();
      return account;
   }
   public void setAccount(Account acc)
   {
    account = acc;
   }
   public TOPP__c getTOPP() {
      if(topp == null) topp = new TOPP__c();
      return topp;
   }

   public Opportunity getOpportunity() {
      if(opportunity == null) opportunity = new Opportunity();
      return opportunity;
   }

   public OpportunityContactRole getRole() {
      if(role == null) role = new OpportunityContactRole();
      return role;
   }

   public List<SelectOption> getItems() {
    List<SelectOption> op = new List<SelectOption>();
    for(Account a : [SELECT Id, Name FROM Account]) op.add(new SelectOption(a.Id, a.Name));
    return op;
  }

   // The next three methods are used to control navigation through  
    
   // the wizard. Each returns a reference to one of the three pages  
    
   // in the wizard.  
    
   public PageReference step1() {
      return Page.TOPPCreator;
   }

   public PageReference step2() {
    return Page.TOPPIncomeExpenses;
 
   }

   public PageReference step3() {
      return Page.TOPPIncomeSecure;
   }
    public PageReference step4() {
      return Page.TOPPWealthDebt;
   }

   public PageReference step5() {
      return Page.TOPPSummary;
   }

   public PageReference step6() {
      return Page.TOPPCustomerAgreement;
   }


   
    
   public PageReference save() {

      
    

      return null;
   }
    

}

 

 

//FIRST VF PAGE

 

<apex:page controller="newTOPPController"  tabStyle="TOPP__c">
   <apex:sectionHeader title="Ny TOPP Gjennomgang"
                      subtitle="Steg 1 av 6"/>
<apex:form >
<apex:pageBlock title="Customer Information">

      <!-- This facet tag defines the "Next" button that appears
           in the footer of the pageBlock. It calls the step2()
           controller method, which returns a pageReference to
           the next step of the wizard. -->  
    
       <apex:pageBlockButtons location="top">
        <apex:commandButton action="{!step2}" value="Next"
                            styleClass="btn"/>
      </apex:pageBlockButtons>
      </apex:pageBlock>

    <apex:pageBlock title="Velge kunde">
     <apex:selectList value="{!name}" size="1" required="true">

      <apex:selectOptions value="{!items}"/>
     </apex:selectList>
      
                  
       

    </apex:pageBlock>
</apex:form>

</apex:page>

 

//SECOND VF PAGE

 

<apex:page controller="newTOPPController"  tabStyle="TOPP__c">
   <apex:sectionHeader title="Ny TOPP Gjennomgang"
                      subtitle="Steg 2 av 6"/>
<apex:form >
<apex:pageBlock title="Customer Information">

      <!-- This facet tag defines the "Next" button that appears
           in the footer of the pageBlock. It calls the step2()
           controller method, which returns a pageReference to
           the next step of the wizard. -->  
    
       <apex:pageBlockButtons location="top">
        <apex:commandButton action="{!step3}" value="Next"
                            styleClass="btn"/>
      </apex:pageBlockButtons>
      </apex:pageBlock>

    <apex:pageBlock title="Velge kunde">
     <apex:selectList value="{!name}" size="1" required="true">

      <apex:selectOptions value="{!items}"/>
     </apex:selectList>
      
                  
       

    </apex:pageBlock>
</apex:form>

</apex:page>

 

I someone can help me here I would preciate that very much!!

Hi!

 

I have problems with testing the following trigger when I tries do deploy it to the server from eclipse. And in Eclipse it is an yellow triangle next to the trigger which says it's only on local machine, not on the server. Is there anybody who can help me. The error I got when I run the test is that from the if clause is never tested... I wonder what's wrong.

 

TRIGGER:

 

trigger CreateAssetOnDoneItem on OpportunityLineItem (after insert,after update) {
  List<OpportunityLineItem> list_oli = new List<OpportunityLineItem>();
  //Setup the array to hold the ids to Iterate through
   Set<Id> pbeIds = new Set<Id>();
  //Iterate through the Line Items
    for (OpportunityLineItem oli : Trigger.new)
    {   
       // Create individual post
       pbeIds.add(oli.PricebookEntryId);
       pbeIds.add(oli.opportunityId);
    }
     //Setup APEX MAP Arrays to get the required data from the Pricebook and Opportunity
    Map<Id, PricebookEntry> entries = new Map<Id, PricebookEntry>([select Product2.ProductCode,Product2.Name from PricebookEntry where id in :pbeIds]);
    Map<Id, Opportunity> Opp = new Map<Id, Opportunity>([select Account.Name, Account.ID from Opportunity where id in :pbeIds]);
    

      Asset[] ast = new Asset[]{};
         Asset a = new Asset();
         Integer teller = 0;
      for(OpportunityLineItem oli: trigger.new){
               
        if(oli.Status__c == 'Godkjent hos leverandør'  && oli.Converted_to_Asset__c == false)
         {
          a = new Asset();
          a.AccountId = opp.get(oli.OpportunityId).AccountId;
          //a.Product2Id = opp.get(oli.Pricebookentryid).PricebookEntry.Product2Id;
          a.Product2Id = oli.PricebookEntry.Product2ID;
          //a.Product2.Name= oli.PricebookEntry.Product2.Name;
          //a.Product2 = oli.PricebookEntry.Product2Id;
          a.Quantity = oli.Quantity;
          a.Opprinnelig_sum__c = a.Quantity;
          //a.Price =  ol.UnitPrice;
          a.PurchaseDate = oli.Opportunity.CloseDate;
          a.Status = 'Mangler provisjon';
          //a.Description = ol.Description;
          a.Provisjon__c = oli.Provisjon__c;
          System.debug(entries.get(oli.Pricebookentryid).Product2.Name);
          a.Name = entries.get(oli.Pricebookentryid).Product2.Name;
          ast.add(a);
          oli.Converted_to_Asset__c = true;
          //update oli;
          }  
    }
       
 
      insert ast;
     
    
}

 

 

TESTCLASS:

 

@isTest
private class testCreateAssetOnDoneItem {

    static testMethod void testCreateAssetOnDoneItem(){
        
        Account a = [select Id from Account limit 1];
        PricebookEntry pbID = [select Id from PricebookEntry limit 1];
        Opportunity o = new Opportunity();
        OpportunityLineItem ol = new OpportunityLineItem();
        
        o.AccountId = a.Id;
        o.Name = 'test';
        o.StageName = 'Presentere mulighet';
        o.CloseDate = date.today();
        insert o;
        
        ol.OpportunityId = o.Id;
        ol.Quantity = 1;
        ol.UnitPrice = 1.00;
        ol.PricebookEntryId = pbId.Id;
        ol.Converted_to_Asset__c = false;
        
        insert ol;
        test.start();
        ol.Status__c= 'Aksetptert salg';
        update o;
        test.stopTest();
        delete ol;
        delete o;
        
        
        
    }
    
    
}

Hi!

 

I am trying to move an opportunityLineItem to asset. I am using some code which where posted in this forum and modified some of it. What my problem is that I am unable to get the product name to be transfered to the asset. All other data seems to be transfered ok. If anybody can help me, I would be thankful. The asset name should be the same as the product name. But there seems to be a problem here. The error msg is: 

 

Error:Apex trigger CreateAssetonDoneItem caused an unexpected exception, contact your administrator: CreateAssetonDoneItem: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.CreateAssetonDoneItem: line 28, column 11

 

 

Here is the trigger:

 

trigger CreateAssetonDoneItem on OpportunityLineItem (before insert, before update) {
  List<OpportunityLineItem> list_oli = new List<OpportunityLineItem>();
  //Setup the array to hold the ids to Iterate through
   Set<Id> pbeIds = new Set<Id>();
  //Iterate through the Line Items
    for (OpportunityLineItem oli : Trigger.new)
    {   
       // Create individual post
       pbeIds.add(oli.PricebookEntryId);
       pbeIds.add(oli.opportunityId);
    }
     //Setup APEX MAP Arrays to get the required data from the Pricebook and Opportunity
    Map<Id, PricebookEntry> entries = new Map<Id, PricebookEntry>([select Product2.ProductCode,Product2.Name from PricebookEntry where id in :pbeIds]);
    Map<Id, Opportunity> Opp = new Map<Id, Opportunity>([select Account.Name, Account.ID from Opportunity where id in :pbeIds]);
    

      Asset[] ast = new Asset[]{};
         Asset a = new Asset();
         Integer teller = 0;
      for(OpportunityLineItem oli: trigger.new){
               
        if(oli.Status__c == 'Godkjent hos leverandør' && oli.Converted_to_Asset__c == false)
         {
          a = new Asset();
          a.AccountId = opp.get(oli.OpportunityId).AccountId;
          //a.Product2Id = opp.get(oli.Pricebookentryid).PricebookEntry.Product2Id;
          a.Product2Id = oli.PricebookEntry.Product2.id;
          a.Product2.Name= oli.PricebookEntry.Product2.Name;
          //a.Product2 = oli.PricebookEntry.Product2Id;
          a.Quantity = oli.Quantity;
          a.Opprinnelig_kj_pesum__c = a.Quantity;
          //a.Price =  ol.UnitPrice;
          a.PurchaseDate = oli.Opportunity.CloseDate;
          a.Status = 'Mangler provisjon';
          //a.Description = ol.Description;
          a.Provisjon__c = oli.Provisjon__c;
          System.debug(entries.get(oli.Pricebookentryid).Product2.Name);
          a.Name = entries.get(oli.Pricebookentryid).Product2.Name;
          ast.add(a);
          oli.Converted_to_Asset__c = true;
          //update oli;
          }  
    }
       
 
      insert ast;
     
    
}

Hi!

 

I am struggling to get the right time (hh:mm) from a Date/Time field. I get the GMT time and not the time in my timezone(in Norway). I wonder why it isn't showing the actual value entered in the field(It is the Start time in event object) Why should it give me the GMT time in VisualForce?? Is there anybody who can help me here?

 

Regards

 

Anders

Hi!

 

I have problems with writing an email template for event-object. I have a trigger which should be fired after insert. It should send an email to the customer(account).

 

I am getting the following error msg when saving the event.

 

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger sendEmailTemplate caused an unexpected exception, contact your administrator: sendEmailTemplate: execution of AfterInsert caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: INVALID_TYPE_FOR_OPERATION, Only Users, Contact or Lead allowed for targetObjectId : 00UT00000024Rod.: []: Trigger.sendEmailTemplate: line 26, column 12

 

The trigger follows here:

 

trigger sendEmailTemplate on Event (after insert) {
 list<event> list_evt = new List<event>();
 List<id> list_id = new List<Id>();
    for (event e : Trigger.new) {   
        list_evt.add(e);
        list_id.add(e.whoid);
    }

       
    List<Contact> conList = [select Id,Name,Email from Contact where Id in :list_id];

        if (list_evt.get(0).Subject =='1.gang' ){
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();  
            //Contact con = list_evt.get(0).Who   
            mail.setSaveAsActivity(false);
            mail.setTargetObjectId(list_evt.get(0).id);
            mail.setWhatId(trigger.new[0].id);
            mail.setTemplateId('00XA0000000a6IP');
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
    }

}

 

The VF template is as following(It's not finished, it's just a start for see that things works

 

<messaging:emailTemplate recipientType="Contact" relatedToType="Event" subject="Møtebekreftelse norKapital">
<messaging:htmlEmailBody >
<html>
        <body>
         <STYLE type="text/css">
               TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center }
               TD  {font-size: 11px; font-face: verdana }
               TABLE {border: solid #CCCCCC; border-width: 1}
               TR {border: solid #CCCCCC; border-width: 1}
         </STYLE>
         <font face="arial" size="2">
                
              Til {!recipient.Name}

              Velkommen til møte hos oss den {!relatedTo.StartDateTime}.
 
    
         </font>
        </body>
</html>

</messaging:htmlEmailBody>

<messaging:plainTextEmailBody >
Congratulations!
This is your new Visualforce Email Template.
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

 

 

 

I hope someone can help me.

Hi!

 

I wonder if there is someone that can help me with a problem. I want to create a custom object portfolio. which should be on the  contact tab. That task is ok. Now I want to fill this object with items from the opportunities object. The data from the opportunities object is the products which are selected. This should happen when the user add product in the opportunity, then it should automatically add to the portfolio object. I know I should use triggers here, but I am not excactly sure how to start. I want to add a line for each product for each opportunity for a given contact. Such that all products for the contact is in one place. It should be like the productlisting in opportunities but now all productlistings for all opportunities.

 

Is there someone which can help me? At least get me started? I am e newbie here so I need to get som help to get the grip on this.

Hi! I wonder if there is possibly to create an product which is generating monthly(or any other periode) income. I can see there is an schedule, but this one can only be run 150 times. Is it possibly to code a solution or is it an function in Salesforce.com? It should generate commission each time.

Hi!

 

I am trying to create a wizard. I have copied the functionality in the tutorial in the VF Dev guide. My problem is that I can't navigate to the next page. I am only reloading the same page when I push the next button. Here is my code:

 

The controller:

 

public with sharing class newTOPPController {
    


   // These four class variables maintain the state of the wizard.  
    
   // When users enter data into the wizard, their input is stored  
    
   // in these variables.  
   String[] selectedName = new String[]{};
   Account account;
   Opportunity opportunity;
   OpportunityContactRole role;
   TOPP__c topp;
   Integer ant = -1;
   


   // The next four methods return one of each of the four class  
    
   // variables. If this is the first time the method is called,  
    
   // it creates an empty record for the variable.  
 
  public String[] getName() {
    return selectedName;
  }

  public void setName(String[] nameAccount) {
    this.selectedName = nameAccount;
  }

   public Integer getAntall()
   {
    return ant;
   }
   public void setAntall(Integer a)
   {
    this.ant = a;
   }
   public Account getAccount() {
      if(account == null) account = new Account();
      return account;
   }
   public void setAccount(Account acc)
   {
    account = acc;
   }
   public TOPP__c getTOPP() {
      if(topp == null) topp = new TOPP__c();
      return topp;
   }

   public Opportunity getOpportunity() {
      if(opportunity == null) opportunity = new Opportunity();
      return opportunity;
   }

   public OpportunityContactRole getRole() {
      if(role == null) role = new OpportunityContactRole();
      return role;
   }

   public List<SelectOption> getItems() {
    List<SelectOption> op = new List<SelectOption>();
    for(Account a : [SELECT Id, Name FROM Account]) op.add(new SelectOption(a.Id, a.Name));
    return op;
  }

   // The next three methods are used to control navigation through  
    
   // the wizard. Each returns a reference to one of the three pages  
    
   // in the wizard.  
    
   public PageReference step1() {
      return Page.TOPPCreator;
   }

   public PageReference step2() {
    return Page.TOPPIncomeExpenses;
 
   }

   public PageReference step3() {
      return Page.TOPPIncomeSecure;
   }
    public PageReference step4() {
      return Page.TOPPWealthDebt;
   }

   public PageReference step5() {
      return Page.TOPPSummary;
   }

   public PageReference step6() {
      return Page.TOPPCustomerAgreement;
   }


   
    
   public PageReference save() {

      
    

      return null;
   }
    

}

 

 

//FIRST VF PAGE

 

<apex:page controller="newTOPPController"  tabStyle="TOPP__c">
   <apex:sectionHeader title="Ny TOPP Gjennomgang"
                      subtitle="Steg 1 av 6"/>
<apex:form >
<apex:pageBlock title="Customer Information">

      <!-- This facet tag defines the "Next" button that appears
           in the footer of the pageBlock. It calls the step2()
           controller method, which returns a pageReference to
           the next step of the wizard. -->  
    
       <apex:pageBlockButtons location="top">
        <apex:commandButton action="{!step2}" value="Next"
                            styleClass="btn"/>
      </apex:pageBlockButtons>
      </apex:pageBlock>

    <apex:pageBlock title="Velge kunde">
     <apex:selectList value="{!name}" size="1" required="true">

      <apex:selectOptions value="{!items}"/>
     </apex:selectList>
      
                  
       

    </apex:pageBlock>
</apex:form>

</apex:page>

 

//SECOND VF PAGE

 

<apex:page controller="newTOPPController"  tabStyle="TOPP__c">
   <apex:sectionHeader title="Ny TOPP Gjennomgang"
                      subtitle="Steg 2 av 6"/>
<apex:form >
<apex:pageBlock title="Customer Information">

      <!-- This facet tag defines the "Next" button that appears
           in the footer of the pageBlock. It calls the step2()
           controller method, which returns a pageReference to
           the next step of the wizard. -->  
    
       <apex:pageBlockButtons location="top">
        <apex:commandButton action="{!step3}" value="Next"
                            styleClass="btn"/>
      </apex:pageBlockButtons>
      </apex:pageBlock>

    <apex:pageBlock title="Velge kunde">
     <apex:selectList value="{!name}" size="1" required="true">

      <apex:selectOptions value="{!items}"/>
     </apex:selectList>
      
                  
       

    </apex:pageBlock>
</apex:form>

</apex:page>

 

I someone can help me here I would preciate that very much!!

Hi!

 

I have problems with testing the following trigger when I tries do deploy it to the server from eclipse. And in Eclipse it is an yellow triangle next to the trigger which says it's only on local machine, not on the server. Is there anybody who can help me. The error I got when I run the test is that from the if clause is never tested... I wonder what's wrong.

 

TRIGGER:

 

trigger CreateAssetOnDoneItem on OpportunityLineItem (after insert,after update) {
  List<OpportunityLineItem> list_oli = new List<OpportunityLineItem>();
  //Setup the array to hold the ids to Iterate through
   Set<Id> pbeIds = new Set<Id>();
  //Iterate through the Line Items
    for (OpportunityLineItem oli : Trigger.new)
    {   
       // Create individual post
       pbeIds.add(oli.PricebookEntryId);
       pbeIds.add(oli.opportunityId);
    }
     //Setup APEX MAP Arrays to get the required data from the Pricebook and Opportunity
    Map<Id, PricebookEntry> entries = new Map<Id, PricebookEntry>([select Product2.ProductCode,Product2.Name from PricebookEntry where id in :pbeIds]);
    Map<Id, Opportunity> Opp = new Map<Id, Opportunity>([select Account.Name, Account.ID from Opportunity where id in :pbeIds]);
    

      Asset[] ast = new Asset[]{};
         Asset a = new Asset();
         Integer teller = 0;
      for(OpportunityLineItem oli: trigger.new){
               
        if(oli.Status__c == 'Godkjent hos leverandør'  && oli.Converted_to_Asset__c == false)
         {
          a = new Asset();
          a.AccountId = opp.get(oli.OpportunityId).AccountId;
          //a.Product2Id = opp.get(oli.Pricebookentryid).PricebookEntry.Product2Id;
          a.Product2Id = oli.PricebookEntry.Product2ID;
          //a.Product2.Name= oli.PricebookEntry.Product2.Name;
          //a.Product2 = oli.PricebookEntry.Product2Id;
          a.Quantity = oli.Quantity;
          a.Opprinnelig_sum__c = a.Quantity;
          //a.Price =  ol.UnitPrice;
          a.PurchaseDate = oli.Opportunity.CloseDate;
          a.Status = 'Mangler provisjon';
          //a.Description = ol.Description;
          a.Provisjon__c = oli.Provisjon__c;
          System.debug(entries.get(oli.Pricebookentryid).Product2.Name);
          a.Name = entries.get(oli.Pricebookentryid).Product2.Name;
          ast.add(a);
          oli.Converted_to_Asset__c = true;
          //update oli;
          }  
    }
       
 
      insert ast;
     
    
}

 

 

TESTCLASS:

 

@isTest
private class testCreateAssetOnDoneItem {

    static testMethod void testCreateAssetOnDoneItem(){
        
        Account a = [select Id from Account limit 1];
        PricebookEntry pbID = [select Id from PricebookEntry limit 1];
        Opportunity o = new Opportunity();
        OpportunityLineItem ol = new OpportunityLineItem();
        
        o.AccountId = a.Id;
        o.Name = 'test';
        o.StageName = 'Presentere mulighet';
        o.CloseDate = date.today();
        insert o;
        
        ol.OpportunityId = o.Id;
        ol.Quantity = 1;
        ol.UnitPrice = 1.00;
        ol.PricebookEntryId = pbId.Id;
        ol.Converted_to_Asset__c = false;
        
        insert ol;
        test.start();
        ol.Status__c= 'Aksetptert salg';
        update o;
        test.stopTest();
        delete ol;
        delete o;
        
        
        
    }
    
    
}

Hi!

 

I have problems with writing an email template for event-object. I have a trigger which should be fired after insert. It should send an email to the customer(account).

 

I am getting the following error msg when saving the event.

 

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger sendEmailTemplate caused an unexpected exception, contact your administrator: sendEmailTemplate: execution of AfterInsert caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: INVALID_TYPE_FOR_OPERATION, Only Users, Contact or Lead allowed for targetObjectId : 00UT00000024Rod.: []: Trigger.sendEmailTemplate: line 26, column 12

 

The trigger follows here:

 

trigger sendEmailTemplate on Event (after insert) {
 list<event> list_evt = new List<event>();
 List<id> list_id = new List<Id>();
    for (event e : Trigger.new) {   
        list_evt.add(e);
        list_id.add(e.whoid);
    }

       
    List<Contact> conList = [select Id,Name,Email from Contact where Id in :list_id];

        if (list_evt.get(0).Subject =='1.gang' ){
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();  
            //Contact con = list_evt.get(0).Who   
            mail.setSaveAsActivity(false);
            mail.setTargetObjectId(list_evt.get(0).id);
            mail.setWhatId(trigger.new[0].id);
            mail.setTemplateId('00XA0000000a6IP');
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
    }

}

 

The VF template is as following(It's not finished, it's just a start for see that things works

 

<messaging:emailTemplate recipientType="Contact" relatedToType="Event" subject="Møtebekreftelse norKapital">
<messaging:htmlEmailBody >
<html>
        <body>
         <STYLE type="text/css">
               TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center }
               TD  {font-size: 11px; font-face: verdana }
               TABLE {border: solid #CCCCCC; border-width: 1}
               TR {border: solid #CCCCCC; border-width: 1}
         </STYLE>
         <font face="arial" size="2">
                
              Til {!recipient.Name}

              Velkommen til møte hos oss den {!relatedTo.StartDateTime}.
 
    
         </font>
        </body>
</html>

</messaging:htmlEmailBody>

<messaging:plainTextEmailBody >
Congratulations!
This is your new Visualforce Email Template.
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

 

 

 

I hope someone can help me.

Hi!

 

I wonder if there is someone that can help me with a problem. I want to create a custom object portfolio. which should be on the  contact tab. That task is ok. Now I want to fill this object with items from the opportunities object. The data from the opportunities object is the products which are selected. This should happen when the user add product in the opportunity, then it should automatically add to the portfolio object. I know I should use triggers here, but I am not excactly sure how to start. I want to add a line for each product for each opportunity for a given contact. Such that all products for the contact is in one place. It should be like the productlisting in opportunities but now all productlistings for all opportunities.

 

Is there someone which can help me? At least get me started? I am e newbie here so I need to get som help to get the grip on this.

Hi! I wonder if there is possibly to create an product which is generating monthly(or any other periode) income. I can see there is an schedule, but this one can only be run 150 times. Is it possibly to code a solution or is it an function in Salesforce.com? It should generate commission each time.