• Kimberly Allen 15
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi,
I am trying to display the opportunitycontactroles list on an object (Deal_Desk_Request__c) related to the opportunity.  I am not getting errors when saving the code, but nothing is appearing in the visualforce page other than the headers.  I am new to apex/visualforce development and not sure what I am doing wrong.  Can someone please help?

Here is the visualforce page:
<apex:page standardcontroller="deal_desk_request__c" extensions="dealdeskcontactrole" >
  <apex:pageblock >
      <apex:pageblocktable value="{!roles}" var="role">
          <apex:column headervalue="Contact" >
                      <apex:outputfield value="{!role.contactid}"/>
                      </apex:column>     
          <apex:column headervalue="Role" >
                      <apex:outputfield value="{!role.role}"/>
                      </apex:column>           
          <apex:column headervalue="Primary" >
                      <apex:outputfield value="{!role.isprimary}"/>
                      </apex:column>           


      </apex:pageblocktable>
  </apex:pageblock>
</apex:page>

Here is the extension class:
public with sharing class dealdeskcontactrole {
list<opportunitycontactrole> roles;
 public final Deal_Desk_Request__c DDR;
    public dealdeskcontactrole(ApexPages.StandardController controller) {
   
        this.DDR = (Deal_Desk_Request__c)controller.getRecord();
    }

    public list<opportunitycontactrole> getroles() {
        try{
        list<opportunitycontactrole> roles = [select id, contactID, Role, Isprimary from opportunitycontactrole where Opportunityid =: DDR.Opportunity__r.id];
         return roles;
        }
        catch(system.exception e){
        return null;
        }     
    }
   }

 
Hi All,
I have a requirement to move the Thumbs up/Down rating from the top of the Knowledge Article page layout to the bottom underneath the actual article.  Like how Salesforce has their documentation set up with the "Was this information helpful? with the thumb up/down buttons"  at the bottom of the page.  Is there an easy way to do this?
Hi,
I am trying to display the opportunitycontactroles list on an object (Deal_Desk_Request__c) related to the opportunity.  I am not getting errors when saving the code, but nothing is appearing in the visualforce page other than the headers.  I am new to apex/visualforce development and not sure what I am doing wrong.  Can someone please help?

Here is the visualforce page:
<apex:page standardcontroller="deal_desk_request__c" extensions="dealdeskcontactrole" >
  <apex:pageblock >
      <apex:pageblocktable value="{!roles}" var="role">
          <apex:column headervalue="Contact" >
                      <apex:outputfield value="{!role.contactid}"/>
                      </apex:column>     
          <apex:column headervalue="Role" >
                      <apex:outputfield value="{!role.role}"/>
                      </apex:column>           
          <apex:column headervalue="Primary" >
                      <apex:outputfield value="{!role.isprimary}"/>
                      </apex:column>           


      </apex:pageblocktable>
  </apex:pageblock>
</apex:page>

Here is the extension class:
public with sharing class dealdeskcontactrole {
list<opportunitycontactrole> roles;
 public final Deal_Desk_Request__c DDR;
    public dealdeskcontactrole(ApexPages.StandardController controller) {
   
        this.DDR = (Deal_Desk_Request__c)controller.getRecord();
    }

    public list<opportunitycontactrole> getroles() {
        try{
        list<opportunitycontactrole> roles = [select id, contactID, Role, Isprimary from opportunitycontactrole where Opportunityid =: DDR.Opportunity__r.id];
         return roles;
        }
        catch(system.exception e){
        return null;
        }     
    }
   }