• Jeff Decker
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
HI Everybody,

I have a standard Implementation object that works very closely like the Opportunity object but has different stages and a few different fields.  I'm trying to hide/show sections of this Implementation object based on what Stage was chosen out of this picklist.  I'm able to get this working when I create a separate visualforce page with the code below but I'm having trouble embedding this in the Implementation object.  I would rather not re-create an entirely custom Implementation object and just put some inline visualforce page into a section that takes care of this functionality. 

When I embed my visualforce page it acts completely separate from the standard Implementation object.  Here is my current visualforce code:

<apex:page standardController="Implementation__c" sidebar="true" tabStyle="Implementation__c">
   
    <apex:form >
       <apex:pageBlock title="Implementation">             
           <apex:pageBlocksection columns="2">
               <apex:outputField value="{!Implementation__c.Name}"/>
                <apex:outputField value="{!Implementation__c.Closed_Date__c}"/>
               <apex:inputField value="{!Implementation__c.Stages__c}">
                <apex:actionSupport event="onchange" reRender="ab, ac"/>  
                 </apex:inputField>
            </apex:pageBlocksection>
            </apex:pageBlock>
    
        <apex:outputpanel id="ab">
                <apex:pageBlock title="Execution" rendered="{!Implementation__c.Stages__c == 'Execution I'}">
                <apex:pageBlockSection >  
                <apex:pageblocksectionItem >
                    <apex:outputField value="{!Implementation__c.Next_Steps__c}"/>
                </apex:pageBlocksectionItem>
            </apex:pageBlocksection>
            </apex:pageblock>
        </apex:outputpanel>    
 
        <apex:outputpanel id="ac">
                <apex:pageBlock title="Completion" rendered="{!Implementation__c.Stages__c == 'Completion'}">
                <apex:pageBlockSection >  
                <apex:pageblocksectionItem >
                    <apex:outputField value="{!Implementation__c.Next_Steps__c}"/>
                </apex:pageBlocksectionItem>
            </apex:pageBlocksection>
            </apex:pageblock>
        </apex:outputpanel>
        
    </apex:form>
</apex:page>

Thanks,
Jeff


 
Hi All,

I'm new to visualforce and trying satisfiy the Business on a new requirement that doesn't seem to be standard functionality in Salesforce.  I have a new object called Quality__c and I'm trying to show open Tasks within different sections of this object based on a custom field that is on the Task.  So for a record in the Quality__c Object there will be a section that is only going to show related Tasks that have an Activity_Type__c = 'Validation'

Here is my Visualforce page:
<apex:page standardController="Quality__c" extensions="SampleDetailPageCon">
    <apex:form >
        <apex:pageMessages />
        <apex:detail relatedList="true"></apex:detail>
        <apex:pageBlock id="customList" title="RelatedTasks">
            <apex:pageblocktable value="{!taskz}" var="o">
                <apex:column value="{!o.subject}"/>
                <apex:column value="{!o.ActivityDate}"/>
                <apex:column value="{!o.Status}"/>
                <apex:column value="{!o.Activity_Type__c}"/>
            </apex:pageblocktable>
        </apex:pageBlock>
        
    </apex:form>
</apex:page>

Here is my Apex controller:
public class SampleDetailPageCon {

    private List<Task> taskz;
    private Quality__c qual;
    
    public SampleDetailPageCon(ApexPages.StandardController controller) {
        
        this.qual = (Quality__c)controller.getRecord();
    }
    
    public List<Task> getTaskz() {
        
        taskz = [SELECT Id, Subject, ActivityDate, Activity_Type__c, Status from Task where Status = 'Open' and Activity_Type__c = 'Validation'];
        return taskz;
    }
}

When I run this visualforce page without any parameters in the URL it only brings back two Tasks that are open and have type of Validation.  Eventually I want to add in the ID as a parameter and only show that record's unique Validation Tasks but I'm not evern that far yet.

User-added image


The problem occurs when I try to embed this Visualforce page into the Quality__c object instead of just showing these two Tasks like before it shows an embedded copy of the entire Quality__c record in this new Section on the Quality__c page.

User-added image

I would like the "New Section" of this object to only show the Tasks that have an Activity_Type__c = "Validation" but instead it's showing the entire record again... Hopefully I'm just missing something small.

I really appreciate any help!
Jeff
HI Everybody,

I have a standard Implementation object that works very closely like the Opportunity object but has different stages and a few different fields.  I'm trying to hide/show sections of this Implementation object based on what Stage was chosen out of this picklist.  I'm able to get this working when I create a separate visualforce page with the code below but I'm having trouble embedding this in the Implementation object.  I would rather not re-create an entirely custom Implementation object and just put some inline visualforce page into a section that takes care of this functionality. 

When I embed my visualforce page it acts completely separate from the standard Implementation object.  Here is my current visualforce code:

<apex:page standardController="Implementation__c" sidebar="true" tabStyle="Implementation__c">
   
    <apex:form >
       <apex:pageBlock title="Implementation">             
           <apex:pageBlocksection columns="2">
               <apex:outputField value="{!Implementation__c.Name}"/>
                <apex:outputField value="{!Implementation__c.Closed_Date__c}"/>
               <apex:inputField value="{!Implementation__c.Stages__c}">
                <apex:actionSupport event="onchange" reRender="ab, ac"/>  
                 </apex:inputField>
            </apex:pageBlocksection>
            </apex:pageBlock>
    
        <apex:outputpanel id="ab">
                <apex:pageBlock title="Execution" rendered="{!Implementation__c.Stages__c == 'Execution I'}">
                <apex:pageBlockSection >  
                <apex:pageblocksectionItem >
                    <apex:outputField value="{!Implementation__c.Next_Steps__c}"/>
                </apex:pageBlocksectionItem>
            </apex:pageBlocksection>
            </apex:pageblock>
        </apex:outputpanel>    
 
        <apex:outputpanel id="ac">
                <apex:pageBlock title="Completion" rendered="{!Implementation__c.Stages__c == 'Completion'}">
                <apex:pageBlockSection >  
                <apex:pageblocksectionItem >
                    <apex:outputField value="{!Implementation__c.Next_Steps__c}"/>
                </apex:pageBlocksectionItem>
            </apex:pageBlocksection>
            </apex:pageblock>
        </apex:outputpanel>
        
    </apex:form>
</apex:page>

Thanks,
Jeff


 
Hi All,

I'm new to visualforce and trying satisfiy the Business on a new requirement that doesn't seem to be standard functionality in Salesforce.  I have a new object called Quality__c and I'm trying to show open Tasks within different sections of this object based on a custom field that is on the Task.  So for a record in the Quality__c Object there will be a section that is only going to show related Tasks that have an Activity_Type__c = 'Validation'

Here is my Visualforce page:
<apex:page standardController="Quality__c" extensions="SampleDetailPageCon">
    <apex:form >
        <apex:pageMessages />
        <apex:detail relatedList="true"></apex:detail>
        <apex:pageBlock id="customList" title="RelatedTasks">
            <apex:pageblocktable value="{!taskz}" var="o">
                <apex:column value="{!o.subject}"/>
                <apex:column value="{!o.ActivityDate}"/>
                <apex:column value="{!o.Status}"/>
                <apex:column value="{!o.Activity_Type__c}"/>
            </apex:pageblocktable>
        </apex:pageBlock>
        
    </apex:form>
</apex:page>

Here is my Apex controller:
public class SampleDetailPageCon {

    private List<Task> taskz;
    private Quality__c qual;
    
    public SampleDetailPageCon(ApexPages.StandardController controller) {
        
        this.qual = (Quality__c)controller.getRecord();
    }
    
    public List<Task> getTaskz() {
        
        taskz = [SELECT Id, Subject, ActivityDate, Activity_Type__c, Status from Task where Status = 'Open' and Activity_Type__c = 'Validation'];
        return taskz;
    }
}

When I run this visualforce page without any parameters in the URL it only brings back two Tasks that are open and have type of Validation.  Eventually I want to add in the ID as a parameter and only show that record's unique Validation Tasks but I'm not evern that far yet.

User-added image


The problem occurs when I try to embed this Visualforce page into the Quality__c object instead of just showing these two Tasks like before it shows an embedded copy of the entire Quality__c record in this new Section on the Quality__c page.

User-added image

I would like the "New Section" of this object to only show the Tasks that have an Activity_Type__c = "Validation" but instead it's showing the entire record again... Hopefully I'm just missing something small.

I really appreciate any help!
Jeff