• EliH
  • NEWBIE
  • 20 Points
  • Member since 2014
  • Sales & Marketing Systems Administrator
  • The Jackson Laboratory

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 2
    Replies
I can't figure out why the list of events expected is not showing up on this page. 

VF Page:

<apex:page standardController="Business_Plan__c" extensions="BusinessPlanEventsControllerExtension"> 
<apex:form >
<apex:pageBlock title="Events">
   <apex:pageBlockTable value="{!eventList}" var="oe">
      <apex:column value="{!oe.OwnerId}"/>      
      <apex:column value="{!oe.StartDateTime}"/> 
      <apex:column value="{!oe.EndDateTime}"/>   
      <apex:column >
          <apex:outputField value="{!oe.Subject}" id="Subject" /> 
          <apex:facet name="header">Subject</apex:facet>
      </apex:column>
      <apex:column value="{!oe.Description}">
          <apex:facet name="header">Purpose of Meeting</apex:facet>
      </apex:column>
      <apex:column value="{!oe.Outcome__c}">
          <apex:facet name="header">Desired and Actual Outcome</apex:facet>
      </apex:column>         
   </apex:pageBlockTable>
   
   <apex:pageBlockButtons > 
                <apex:commandButton value="Save" action="{!save}" id="saveButton" />
                <apex:commandButton value="Cancel" action="{!cancel}" id="cancelButton" />
   </apex:pageBlockButtons> 
   
</apex:pageBlock>
</apex:form>
</apex:page>

Controller Extension:

public with sharing class BusinessPlanEventsControllerExtension {
    public Business_Plan__c bp;
    public Business_Plan__c bpInfo;
    public List<Event> eventList {get;set;}
    public List<Task> taskList;
        
    public BusinessPlanEventsControllerExtension(ApexPages.StandardController Controller) {        
        bp = (Business_Plan__c)controller.getRecord();     
    }    

    public List<Event> getEvents(){          
        bpInfo = [SELECT Id FROM Business_Plan__c WHERE id =: bp.Id];
        eventList = new List<Event>();
        eventList = [SELECT Id, OwnerId, Subject, StartDateTime, EndDateTime, Description, Outcome__c,  Complete__c 
                     FROM Event WHERE WhatId =: bpInfo.Id ];
        System.debug('Event List' + eventList);
        return eventList;         
    }                               

}
  • July 12, 2018
  • Like
  • 0
The Jackson Laboratory (JAX) is an independent, nonprofit biomedical research institution with a mission to discover precise genomic solutions for disease and empower the global biomedical community in the shared quest to improve human health. The Laboratory is a world leader in mammalian genetics and human genomics and generating the development of scientific breakthroughs and improved therapies with ever-greater precision and speed. We also educate current and future scientists and provide critical resources, data, tools and services to researchers worldwide.

This position will be supporting sales and marketing in a rapidly changing CRM environment. The successful candidate will have demonstrated experience in CRM administration, demonstrated success in managing projects, and experience working successfully with cross-functional teams.

Find more information and application process here: http://bit.ly/2GgrcF9
  • January 25, 2018
  • Like
  • 0
The goal is to display contracts related to an opportunity's account or its parent account on an opportunity page layout. The extension, however, is not returning any results to the visualforce page when it should.
Here is the visualforce code:
<apex:page standardController="Opportunity" extensions="RelatedContracts" tabStyle="Opportunity">    
<apex:form >
    <apex:pageBlock >       
        <apex:pageBlockTable value="{!contracts}" var="c">                              
            <apex:column value="{!c.AccountId}" />
    		<apex:column headerValue="ContractName">
                <apex:outputLink value="{!URLFOR('/')}{!c.Id}" target="_blank">{!c.ContractNumber}
                </apex:outputLink>
            </apex:column>
            <apex:column value="{!c.Status}" /> 
    		<apex:column value="{!c.StartDate}" />
	        <apex:column value="{!c.Enddate}" />  
            <apex:column value="{!c.SpecialTerms}" />  
    </apex:pageBlockTable>
    </apex:pageBlock>          
</apex:form>       
</apex:page>

And here is my extension class:
public with sharing class RelatedContracts {    
    public Opportunity opp {get;set;}
    public Opportunity oppInfo {get;set;}
    public Account acct {get;set;}
    public List<Contract> contracts {get;set;}
    
    public RelatedContracts(ApexPages.StandardController controller){
        opp = (Opportunity)controller.getRecord();                
    }    
    
    public List<Contract> getcontracts(){
        oppInfo = [SELECT AccountId from Opportunity WHERE id =: opp.Id];
        acct = [SELECT Id, ParentId from Account WHERE id =: oppInfo.AccountId];
        contracts = new List<Contract>();
        contracts = [SELECT Id, RecordTypeId, Status, ContractNumber, StartDate, EndDate, SpecialTerms, Description FROM Contract 
                WHERE AccountId =:oppInfo.AccountId or AccountId =:acct.ParentId];
        System.debug('ContractList' + contracts);
       	return contracts;            
    }
    
}


 
  • September 02, 2015
  • Like
  • 0
I want to create one custom button that creates an opportunity from a contact record, but I want the value of the close date field to pre-fill based on the record type chosen by the user. Despite the fact that the edit page clearly shows which record type I have chosen, the URL doesn't seem to be able to pick this up. Any ideas for a workaround that doesn't involve creating separate buttons for each record type?

Here is my URL:
/setup/ui/recordtypeselect.jsp?ent=Opportunity
&opp9={!IF( CONTAINS(Opportunity.RecordType,"012U0000000QBTe"),TODAY()+90,TODAY()+60)}
  • July 02, 2014
  • Like
  • 0
I've embedded a Visualforce page (that contains about 50 fields from the contact record) in the contact page layout to save space. I want to allow users to edit the fields in the embedded page at the same time that they edit other fields on the page layout (outside of the Visualforce page), but I can't seem to find a way to do this. Ideas?
  • March 19, 2014
  • Like
  • 0
The goal is to display contracts related to an opportunity's account or its parent account on an opportunity page layout. The extension, however, is not returning any results to the visualforce page when it should.
Here is the visualforce code:
<apex:page standardController="Opportunity" extensions="RelatedContracts" tabStyle="Opportunity">    
<apex:form >
    <apex:pageBlock >       
        <apex:pageBlockTable value="{!contracts}" var="c">                              
            <apex:column value="{!c.AccountId}" />
    		<apex:column headerValue="ContractName">
                <apex:outputLink value="{!URLFOR('/')}{!c.Id}" target="_blank">{!c.ContractNumber}
                </apex:outputLink>
            </apex:column>
            <apex:column value="{!c.Status}" /> 
    		<apex:column value="{!c.StartDate}" />
	        <apex:column value="{!c.Enddate}" />  
            <apex:column value="{!c.SpecialTerms}" />  
    </apex:pageBlockTable>
    </apex:pageBlock>          
</apex:form>       
</apex:page>

And here is my extension class:
public with sharing class RelatedContracts {    
    public Opportunity opp {get;set;}
    public Opportunity oppInfo {get;set;}
    public Account acct {get;set;}
    public List<Contract> contracts {get;set;}
    
    public RelatedContracts(ApexPages.StandardController controller){
        opp = (Opportunity)controller.getRecord();                
    }    
    
    public List<Contract> getcontracts(){
        oppInfo = [SELECT AccountId from Opportunity WHERE id =: opp.Id];
        acct = [SELECT Id, ParentId from Account WHERE id =: oppInfo.AccountId];
        contracts = new List<Contract>();
        contracts = [SELECT Id, RecordTypeId, Status, ContractNumber, StartDate, EndDate, SpecialTerms, Description FROM Contract 
                WHERE AccountId =:oppInfo.AccountId or AccountId =:acct.ParentId];
        System.debug('ContractList' + contracts);
       	return contracts;            
    }
    
}


 
  • September 02, 2015
  • Like
  • 0
Hi all:
   I am using an Integration Tool to upload data into the products2 and pricebookEntry table... Now, I can load data into the product2 table no issues there. But when I try to load the pricebookentry to link back to product2Is and pricebook2Id.. the issue I have having is "[SFDC] No standard price defined for this product    [SFDC] STANDARD_PRICE_NOT_DEFINED"
Ok Now I know that standard price is the default unit price if you go through the excel connector in a Product table...
But how do you fill it through an API when it is not part of the product2 table???
Any help ... Please Advise...
Thanks
Shan