• RossGilbert
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 12
    Replies

I have a simple need. I just want to override the opportunity tab for all users to show only the list view of recently viewed opps (getting rid of the tools, reports, etc options on the tab view).

 

I know how to override the tab, but what code do I need in my vf page that keeps that "View:" dropdown menu at the top of the page?  no matter what page I use to override the opp tab, I lose that view selection menu, which i definitely want to keep.  i casn't find anything about this online, amazingly.

 

this is easy.  anyone know how to keep that "view" picklist on a standard tab override?

I don't need to do this as there's a workaround with Data Loader, but I'm interested in automating this if possible.

 

Basically, I want a field on the Account object (you could call the field "Has an opp in stage 1 2 or 3?" that is a checkbox, that is automatically updated to be true or false, depending on whether the account has any opps at the present time in stage 1 2 or 3.  Is this something I need a trigger for?

Hi-

 

Does anyone know how to write the test class for the following trigger?  Any code is much appreciated.  This is a simple trigger that spontaneously creates a new custom object record (called the Vehicle object) when a new Opportunity object record is created with a specific Type field value:

 

 

trigger createVehicleOnOpportunityX on Opportunity (after insert) {
    
List <Vehicle__c> vehToInsert = new List <Vehicle__c>  ();  

    
    for (Opportunity o : Trigger.new) {
        
        if (o.Type == 'NS-TO (New Sale - Task Order Contract)') {
        
        Vehicle__c v = new Vehicle__c (); 
        
        v.Name = o.Name;  
         v.Vehicle_HEGR__c= o.Historical_EGR__c;
          v.Vehicle_Amount__c = o.Amount;
           v.Vehicle_Recompete__c = o.Is_Recompete__c;
            v.Vehicle_Gross_Capacity__c = o.Gross_Capacity__c;
             v.Vehicle_Stage__c = o.StageName;


        
        vehToInsert.add(v);
        
        
        }//end if
        
    }//end for o
    


    try {
        insert vehToInsert; 
    } catch (system.Dmlexception e) {
        system.debug (e);
    }
    
}

 

 

OK so I've been an admin for about 3 years and (for better or worse) know more about SF than anyone in my company.  i have some experience with apex and Visualforce, but little with triggers.

 

what i need is to write a trigger in production that does this:  the trigger should create a new record in a custom object called "Vehicles" when an Opportunity record is created with a specific value in one of its custom fields (the field is called "Type").  So, when an opp is created and saved with Type = "x", then the trigger should fire, and a new vehicle object record should be created that is populated with a few fields from that opportunity record.

 

can anyone send me some code to show me what this trigger should be or look like?  I've been researching this but have no clue, and I'm afraid of writing bad code that will cause problems.

 

also, the custom object is not in a parent-child relationship with the opporuntiy object, and i don't want it to be unless it has to be.

 

i know the developers in here are ridiculously smart and talented, and i'm just hoping one of you feels sorry enough for an amateur like me to help me out.  thanks a lot.

Hi,

  I need to generate a report which shows the total number of activites (Both open and closed) for each leads.  

 

I also need to show the last activity date. There is a last activity date in Lead, and that is showing the due date of the last activity date. 

 

 

  • April 13, 2011
  • Like
  • 0

We have a custom object in our sf instance called projects- we use it to track our customer implementations.   When an opportunity is closed, I would like a new project to automatically open and pull over some of the data from the opportunity.  I had hoped I could do this with workflow but I was told I need to use APEX.  I have never written apex code and was hoping someone may have something to share or could point me to some beginner reference material.  Thanks in advance!

OK so I've been an admin for about 3 years and (for better or worse) know more about SF than anyone in my company.  i have some experience with apex and Visualforce, but little with triggers.

 

what i need is to write a trigger in production that does this:  the trigger should create a new record in a custom object called "Vehicles" when an Opportunity record is created with a specific value in one of its custom fields (the field is called "Type").  So, when an opp is created and saved with Type = "x", then the trigger should fire, and a new vehicle object record should be created that is populated with a few fields from that opportunity record.

 

can anyone send me some code to show me what this trigger should be or look like?  I've been researching this but have no clue, and I'm afraid of writing bad code that will cause problems.

 

also, the custom object is not in a parent-child relationship with the opporuntiy object, and i don't want it to be unless it has to be.

 

i know the developers in here are ridiculously smart and talented, and i'm just hoping one of you feels sorry enough for an amateur like me to help me out.  thanks a lot.