• Matt_F
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
I am trying to use the following code to show a tab on my Visualforce page only if the current user has a license for Apttus, but for some reason, when the code is in place, no records show in the tab.

<apex:tab label="Associated Agreements" name="Agreements" id="tabAgreements">

          <apex:relatedList subject="{!opportunity}" list="Apttus__R00N50000001Xl0FEAS__r" rendered="{$UserInfo.isCurrentUserLicensed('Apttus')}" />

      </apex:tab>

 Any help you can provide would be greatly appreciated 
Thanks.


 
  • February 03, 2015
  • Like
  • 0
I have a joined report that I am generating from the Milestones PM app.  The report is a joined report with both the projects object and the logs object.  We are using the logs object as a project notes object.  The two objects are linked by the project ID in the report.  What I am looking to do is to limit the number of log entries that are returned to 2.  I can't do a row limit in the report, because the joined report type doesn't support row limits.  Does anyone have any ideas as to how this can be done?

Thanks,

Matt 
  • January 28, 2014
  • Like
  • 0

I am creating a VF page to show all accounts and contacts (name, email address) that have an asset that is selected from a picklist.

 

I am having a problem creating the query.  I need to query Accounts, Contacts and Assets.  I can't do it as a Parent - Child because I can only do 1 child.

 

My goal is to have a query that shows all the accounts, and all of the contacts associated with the accounts for a given asset.

 

Any help that I get will be greatly appreciated.

 

Thanks

  • November 07, 2012
  • Like
  • 0

Any help that can be provided will be greatly appreciated.

 

I'm not sure what the problem is, but I am receiving the following error:

 

System.TypeException: Invalid conversion from runtime type SOBJECT:Opportunity to SOBJECT:Value_Tests__c

Class.ValueTestExtension.<init>: line 5, column 1

 

Extension

public with sharing class ValueTestExtension {
    Opportunity o;
    Value_Tests__c vt;
    public ValueTestExtension (ApexPages.StandardController controller){
        vt = (Value_Tests__c) controller.getRecord();
    }
    public List<Value_Tests__c> getValueTests(){
        return [SELECT actual_completion_date__c, approval_date__c, Outcome__C FROM value_tests__c WHERE OppID__c = :o.id];
            }
}

 VF Page:

<apex:page standardController="Opportunity" extensions="ValueTestExtension">
  <apex:pageBlock >
    <apex:pageBlockSection columns="1" title="Opportunity Detail Info">
      <apex:outputField value="{!opportunity.name}"/>
      <apex:outputField value="{!opportunity.ownerId}"/>
    </apex:pageBlockSection>
    
    <apex:pageBlockSection columns="1" title="Value Test Info">
      <apex:pageBlockTable value="{!ValueTests}" var="vt">
        <apex:column value="{!vt.Actual_Completion_Date__c}"/>
        <apex:column value="{!vt.Approval_Date__c}"/>
      </apex:pageblockTable>
    </apex:pageBlockSection>
    
   </apex:pageBlock>
</apex:page>

 Again, I appreciate any help you can give me.

 

Thanks,

 

Matt

 

  • October 23, 2012
  • Like
  • 0

Here is what I am hoping to accomplish:

 

 I have a custom object "Value Test" that is linked to the Opportunity object.  I am creating a VF form to populate the Value Test object.  Some of the fields on the VF form will take information from the opportunity, so I would like those to autofill.  I also want to create a custom button on the opportunity to open the VF form.  The problem I am having is trying to figure out how to be able to access the fields for both the Value Test custom object and the Opportunity object on the same VF form.  If I use Value_Test__c as the controller, I can't pull any information from the opportunity object into the form and I cannot add the custom button to the opportunity.  If I use Opportunity as the controller, I can't populate any information from the VF form to the Value Test custom object.  I am pretty sure that I need to use a controller extension, but I'm not familiar with them. 

 

Any help that you can give me will be greatly appreciated.

 

Thanks,

 

Matt

  • October 22, 2012
  • Like
  • 0
I am trying to use the following code to show a tab on my Visualforce page only if the current user has a license for Apttus, but for some reason, when the code is in place, no records show in the tab.

<apex:tab label="Associated Agreements" name="Agreements" id="tabAgreements">

          <apex:relatedList subject="{!opportunity}" list="Apttus__R00N50000001Xl0FEAS__r" rendered="{$UserInfo.isCurrentUserLicensed('Apttus')}" />

      </apex:tab>

 Any help you can provide would be greatly appreciated 
Thanks.


 
  • February 03, 2015
  • Like
  • 0

I am creating a VF page to show all accounts and contacts (name, email address) that have an asset that is selected from a picklist.

 

I am having a problem creating the query.  I need to query Accounts, Contacts and Assets.  I can't do it as a Parent - Child because I can only do 1 child.

 

My goal is to have a query that shows all the accounts, and all of the contacts associated with the accounts for a given asset.

 

Any help that I get will be greatly appreciated.

 

Thanks

  • November 07, 2012
  • Like
  • 0

Any help that can be provided will be greatly appreciated.

 

I'm not sure what the problem is, but I am receiving the following error:

 

System.TypeException: Invalid conversion from runtime type SOBJECT:Opportunity to SOBJECT:Value_Tests__c

Class.ValueTestExtension.<init>: line 5, column 1

 

Extension

public with sharing class ValueTestExtension {
    Opportunity o;
    Value_Tests__c vt;
    public ValueTestExtension (ApexPages.StandardController controller){
        vt = (Value_Tests__c) controller.getRecord();
    }
    public List<Value_Tests__c> getValueTests(){
        return [SELECT actual_completion_date__c, approval_date__c, Outcome__C FROM value_tests__c WHERE OppID__c = :o.id];
            }
}

 VF Page:

<apex:page standardController="Opportunity" extensions="ValueTestExtension">
  <apex:pageBlock >
    <apex:pageBlockSection columns="1" title="Opportunity Detail Info">
      <apex:outputField value="{!opportunity.name}"/>
      <apex:outputField value="{!opportunity.ownerId}"/>
    </apex:pageBlockSection>
    
    <apex:pageBlockSection columns="1" title="Value Test Info">
      <apex:pageBlockTable value="{!ValueTests}" var="vt">
        <apex:column value="{!vt.Actual_Completion_Date__c}"/>
        <apex:column value="{!vt.Approval_Date__c}"/>
      </apex:pageblockTable>
    </apex:pageBlockSection>
    
   </apex:pageBlock>
</apex:page>

 Again, I appreciate any help you can give me.

 

Thanks,

 

Matt

 

  • October 23, 2012
  • Like
  • 0