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
rtrevo915rtrevo915 

Query Parameters for keySet

This is my first development project and I'm trying to run a query that finds and passes through the Case ID.  I know it's finding the Case ID because when the page initially loads it brings in the the Case ID and all !relatedcase fields, however on save, those !relatedcase fields become blank.  Here is where I believe the issue is in the controller:

 

public Log_a_Call_Controller_Extension_Create(ApexPages.StandardController stdController) { this.log_call = (Case_Call_Log__c)stdController.getRecord(); Map<string, string> query_parameters = ApexPages.currentPage().getParameters(); // find this querystring key / value: CF00NS0000000eZs4_lkid=500S00000014ccK for(String key : query_parameters.keySet()) { if (key.contains('_lkid')) { this.case_id = query_parameters.get(key); } } this.current_case = [select c.Id, c.MERCHANT_NO__c, c.Product_Device_Type__c, c.PSG_Campaign_Name__c, c.PSG_Account_Phone__c, c.PSG_Processor__c, c.POS_Creation_Date__c, c.CaseNumber from Case c where c.Id = :case_id]; }

 

 

 

Here is the Page Markup for those fields:

 

<apex:page standardController="Case_Call_Log__c" extensions="Log_a_Call_Controller_Extension_Create" showHeader="true" tabStyle="Case_Call_Log__c" title="Log a Call" > <apex:form > <apex:pageBlock title="Log a Call"> <apex:pageBlockButtons > <apex:commandButton action="{!Save}" value="Save"/> <apex:commandButton action="{!Cancel}" value="Cancel"/> </apex:pageBlockButtons> <apex:pageBlockSection collapsible="true" columns="2" title="Case Details"> <apex:PageBlockSectionItem > <apex:outputLabel value="SE Number"></apex:outputLabel> <apex:outputText value="{0}"> <apex:param value="{!relatedcase.MERCHANT_NO__c}"/> </apex:outputText> </apex:pageBlockSectionItem> <apex:pageblockSectionItem > <apex:outputLabel value="Case Number"></apex:outputLabel> <apex:outputLink value="/{!relatedCase.CaseNumber}" >{!relatedCase.CaseNumber}</apex:outputLink> </apex:pageblockSectionItem> <apex:PageBlockSectionItem > <apex:outputLabel value="Campaign Name"></apex:outputLabel> <apex:outputText value="{0}"> <apex:param value="{!relatedcase.PSG_Campaign_Name__c}"/> </apex:outputText> </apex:pageBlockSectionItem> <apex:PageBlockSectionItem > <apex:outputLabel value="Campaign Product"></apex:outputLabel> <apex:inputField value="{!Case_Call_Log__c.Campaign_Product__c}"></apex:inputField> </apex:pageBlockSectionItem> <apex:PageBlockSectionItem > <apex:outputLabel value="Current Product"></apex:outputLabel> <apex:outputText value="{0}"> <apex:param value="{!relatedcase.Product_Device_Type__c}"/> </apex:outputText> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Processor"></apex:outputLabel> <apex:outputText value="{0}"> <apex:param value="{!relatedcase.PSG_Processor__c}"/> </apex:outputText> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="POS Creation Date"></apex:outputLabel> <apex:outputText value="{0}"> <apex:param value="{!relatedcase.POS_Creation_Date__c}"/> </apex:outputText> </apex:pageBlockSectionItem> </apex:pageBlockSection> <apex:pageBlockSection collapsible="true" columns="2" title="Contact Details"> <apex:PageBlockSectionItem > <apex:outputLabel value="Contact Method"></apex:outputLabel> <apex:inputField value="{!Case_Call_Log__c.Contact_Method__c}"></apex:inputField> </apex:pageBlockSectionItem> <apex:pageblockSectionItem > <apex:outputLabel value="Contact Phone"></apex:outputLabel> <apex:outputText value="{0}"> <apex:param value="{!relatedcase.PSG_Account_Phone__c}"/> </apex:outputText> </apex:pageBlockSectionItem>

 

 

  

Any suggestions on how to rectify the issue are greatly appreciated.

 

Thank you in advance.

 

Ryan