• mdavis.ax765
  • NEWBIE
  • 25 Points
  • Member since 2010

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

Summary: When an Opportunity goes to the Stage Closed Won, I am trying to create a record in a child object. This child object is new, so I have latitude to make changes to it however I need to but I started with it having a Master-Detail relationship as I want to be able to report on information downstream off of both the Opportunity and this object and I need it to be a one to many relationship that we can manually create additional child records on.

 

This is my first attempt at creating a trigger so any help is much appreciated. I got a start by another posting on this board!

 

 

Error: Compile Error: unexpected token: 'List' at line 3 column 4
trigger createSplitCommissionOnOpportunityX on Opportunity (after insert) {
    
    List Split_Commissions__c SCToInsert = new List Split_Commissions__c  (); 
   
    for (Opportunity o : Trigger.new) {
        
       
        if (o.StageName == 'Closed Won') {
        
        Split_Commissions__c SC = new Split_Commissions__c (); 
        
        sc.Opportunity_Name__c = o.Name; 
        
        SCToInsert.add(sc);
        
        
        }//end if
        
    }//end for o
    
    //once loop is done, you need to insert new records in SF
    // dml operations might cause an error, so you need to catch it with try/catch block.
    try {
        insert SCToInsert; 
    } catch (system.Dmlexception e) {
        system.debug (e);
    }

trigger createSplitCommissionOnOpportunityX on Opportunity (after insert) {        List Split_Commissions__c SCToInsert = new List Split_Commissions__c  ();        for (Opportunity o : Trigger.new) {                       if (o.StageName == 'Closed Won') {                Split_Commissions__c SC = new Split_Commissions__c ();                 sc.Opportunity_Name__c = o.Name;                 SCToInsert.add(sc);                        }//end if            }//end for o        //once loop is done, you need to insert new records in SF    // dml operations might cause an error, so you need to catch it with try/catch block.    try {        insert SCToInsert;     } catch (system.Dmlexception e) {        system.debug (e);    }

 

Hello,

 

We sell products to accounts who each may have different commissions. In the opportunity products environment for different type of products, I have created a simple formula that looks up the commission depending on the product family and the account. The problem is, SF does not allow for roll up sums on "cross object formulas" which is silly but I can't change that today. My question is, Does anyone know of a workaround to have a roll up summary of commission on the opportunity level?

 

Thanks!

 

Steven

Is it possible to create a Free Trial on Appexchange (eg 30 days) for a managed package that contain time-based workflow.  

 

The reason I ask is because time-based workflow cannot be packaged, and must be configured for each end customer who installs the free trial.  Since time-based workflow is an integral part of our application, does this mean we will be unable to use the “Free Trial” on the Appexchange?

 

Thanks in advance.

AppExchange Trial orgs have wrong home page layout (b/c of chatter features)

One of our applications, Absolute Automation, has Trialforce enabled and we are in the process of enabling the new "Trials on the AppExchange" feature.

This particular app doesn't use Chatter, so our "Trialforce Master Org" had chatter turned off.  In the security review process of AppExchange Trials, I created a new trial org from the TMO.  In this org, I noticed that Chatter was turned on.

This messes with our home page layout, so the "intro screen" we've crafted for new users doesn't look right.  To try to fix this, I went back to the TMO, enabled chatter, and then clicked the "Don't show this again" and "Hide Chatter" buttons so our home page "intro screen" looked right.

I then restarted the security review & created a new trial org from the new TMO export ... however the Chatter
features are once again taking up all the space on my home page.  As a result, trial users never really see the our intro screen because it's pushed off the page.

Here's what our homepage should look like (screenshot from our TMO immediately prior to DOT export):

 

TMO home page

 

And here's what it looks like in the trial org, regardless of the settings in my TMO:

trial org homepage

I have been asked to turn a link off when a trial user is accessing our package. (We are using Trialforce and the LMA.) I see the method:

 

    UserInfo.isCurrentUserLicensed('namespace')

 

but am looking for confirmation that it returns false for "Trial" users and true when the trial is converted to "Active" via the LMA.

 

Thanks,

Keith

So I called SF Basic support and they said I need a formula to do what I need done, that they can't do formula, and that I should ask here...  So here I am. 

 

I am trying to filter contact views based on a custom field value in the contact's associated account record.  But Account custom fields don;t come up in the logic filter fields under contact views. 

 

So if I could pull in the field value (pick list) from the contacts associated account custom field then it would appear in my view logic filter, and I would be happy. 

 

So I have a account custom field named Account Relationship with multiple pick list text values.  How do I:

 

  • Replicate the vales into a contact custom field
  • For all contacts associated with a given account

 

Thanks team. 

 

 

Hi All,


In a child object I want to have a forumla field that should display the selected mult-picklist values present in the parent object.

 

How can I do it? I am not able to use the merge field directly or using any of the available functions including text()

 

 

Thanks in advance

Vijay