function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rwalrath144rwalrath144 

Related List Help!

I have a custom object called Call_Log that is the parent to another custom object called ASI Solutions. I have a field called "Additinal Details" from Call Log that dynamically populates another picklist called "Solution Type" on the same Visualforce page. The Visualforce page uses Call Log as the standard controller. I accomplish this with an Extended Controller called callsolutionExtension.

 

The fields populate nicely. What I am trying to do is display the detail page of the ASI Solution that is displayed in the Solution Type. All this I am trying to do dynamically using onchange and partial page refresh. I will paste the extension controller and the Visualforce code that is pertinate. The code is accepted however the detail of the Solution is not showing.

 

Controller Extension:

public class callsolutionExtension{ private final Call_Log__c call; public string solutionTypes {get; set;} public callsolutionExtension(ApexPages.StandardController callController){ this.call = (Call_Log__c)callController.getRecord(); solutionTypes = call.Solution_Type__c; } public List<selectOption> solutionTypeOptions {get { List<selectOption> solutionTypes = new List<selectOption>(); for (ASI_Solutions__c asr: [select Id, name from ASI_Solutions__c sol where sol.Incident_Reference__c = :call.Call_Details__c order by name]) solutionTypes.add(new selectOption (asr.id, asr.name)); return solutionTypes; } private set;} }

Below is the section that calls to extension and also the code at the bottom to populate the detail.

 

<apex:pageblockSection id="dependentSolutionType"> <apex:pageBlockSectionItem > <apex:outputLabel value="Solution Type" for="sol"/> <apex:panelGrid columns="2"> <apex:outputText value="{!Call_Log__c.Solution_Type__c}" rendered="false"/> <apex:selectList id="sol" value="{!solutionTypes}" size="1"> <apex:selectOptions value="{!solutionTypeOptions}"/> <apex:actionSupport event="onchange" reRender="thePage:solutiondetail"/> <apex:param name="detail" value="{!Call_Log__c.ID}"> </apex:param> </apex:selectList> </apex:panelGrid> </apex:pageBlockSectionItem> <apex:outputPanel id="solutiondetail"> <apex:detail subject="{!$CurrentPage.parameters.detail}" title="false" id="detail"> </apex:detail> </apex:outputPanel> </apex:page>

I could really use some help on this. I don't know what I am doing wrong. I think it might be the extended class isn't calling the ID of the Solution as well as the name and associating properly. I just don't know.

 

Thanks