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
Tyler HarrisTyler Harris 

Action Function Rerendering Targeting?

Hello,

I'm a bit stumped in my own code. I've got some JavaScript that calls an ActionFunction that then is supposed to rerender an id called "sensorSku". I have no idea where this id is in my visualforce code. Does the ActionFunction call something less explicit like 'sensorskusection' ? There isn't an Id with "sensorSku' in my Visualforce at all. The code is targeting the Sensor_SKU__c field.

JavaScript
function setSSKU(){
            
            var SSKUE = document.getElementById('{!$Component.frm:pbMainLumidigm:LumidigmSection:sensorSkuSection:sensorSkuif}');
            var model = document.getElementById('{!$Component.frm:pbMainLumidigm:caseRoutingSection:SSKUSectionItem:LuModel}').value;
            if(model=='M-Series'){
                for(i=0; i < SSKUE.options.length; i++){
     				if(SSKUE.options[i].text.toString().indexOf('V') >= 0){
                        SSKUE.options[i].style.display = 'none';
                        SSKUE.options[i].setAttribute("disabled","disabled");
                       
                        }
                    if(SSKUE.options[i].text.toString().indexOf('M') >= 0){
                        if(SSKUE.options[i].style.display == 'none'){
                            SSKUE.options[i].style.display ='block';
                        	SSKUE.options[i].removeAttribute("disabled");
                        }
                    }
                }
            }
            
            if(model=='V-Series'){
                for(i=0; i < SSKUE.options.length; i++){
     				if(SSKUE.options[i].text.toString().indexOf('M') >= 0){
                        SSKUE.options[i].style.display = 'none';
    					SSKUE.options[i].setAttribute("disabled","disabled");
            	    }
                    if(SSKUE.options[i].text.toString().indexOf('V')>=0){
                        if(SSKUE.options[i].style.display =='none'){
                            SSKUE.options[i].style.display = 'block';
                            SSKUE.options[i].removeAttribute("disabled");
                        }
                    }
                }
            }
                
            reRenderSSKU();
        }

Visualforce
<apex:actionFunction reRender="pbsResInfo" immediate="true" action="{!showProblemCode}" name="callshowProblemCode">
            <apex:param value="drdValue" name="drdValue"/>
        </apex:actionFunction>
        <apex:actionFunction name="reRenderSSKU" reRender="sensorSku"/>
        <apex:sectionHeader rendered="{!isCaseEdit}" title="Case Edit" subtitle="{!objCase.CaseNumber}"/>
        <apex:sectionHeader rendered="{!isCaseNew}" title="New Case" subtitle="{!objCase.CaseNumber}"/>
        
        <!-- Lumidigm -->
        <apex:pageBlock id="pbMainLumidigm" title="Case Edit" rendered="{!IsLumidigmRecType}">
  
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!saveCase}" onclick="return validateChannelPartner();"/>
                 <apex:commandButton value="Save & Close" action="{!saveAndCloseCase}" onclick="return validateChannelPartner();"/>
                <apex:commandButton value="Cancel" immediate="true" action="{!cancelCase}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection id="pbsFirst" title="Case Information" >
            <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Parent Case"></apex:outputLabel>
                    <apex:inputField value="{!objCase.ParentId}"/>                   
                </apex:pageBlockSectionItem>                                   
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Case Owner"></apex:outputLabel>
                    <apex:outputField value="{!objCase.ownerid}"/>                   
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Case Record Type"/>
                    <apex:outputField value="{!objCase.RecordTypeId}"/>
                </apex:pageBlockSectionItem>
               <apex:pageBlockSectionItem id="pbsItemaccName" >                   
                    <apex:outputLabel value="Account Name"/>
                    <apex:outputPanel id="opAccName">                       
                        <apex:outputLabel id="txtAccName" value="{!strAccName}"/>
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>  
                <apex:pageBlockSectionItem >                
                    <apex:outputLabel value="Status"/>
                    <apex:inputField required="true" value="{!objCase.status}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Contact Name"/>
                        <apex:ActionRegion >
                            <apex:actionFunction name="callsetAccountName" rerender="opAccName, opchPartnerAcc" action="{!setAccountName}">
                                <apex:param value="" name="purcPath"/>
                            </apex:actionFunction>
                            <apex:inputField onChange="setAccountName();" value="{!objCase.ContactId}" required="true"/>
                        </apex:ActionRegion>
                </apex:pageBlockSectionItem>     
                <apex:pageBlockSectionItem HelpText="{!$ObjectType.Case.fields.Reason_Re_opened__c.inlineHelpText}">                   
                    <apex:outputLabel value="Reason Re-opened"/>                    
                    <apex:inputField value="{!objCase.Reason_Re_opened__c}"/>
                </apex:pageBlockSectionItem>
                                   
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Test Track Pro Item Number"/>
                    <apex:inputField value="{!objCase.Test_Track_Pro_Item_Number__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Case Origin" />
                    <apex:inputField required="true" value="{!objCase.Origin}"/>
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem HelpText="{!$ObjectType.Case.fields.Priority.inlineHelpText}" rendered="{!!ispivCLASS}">                   
                    <apex:outputLabel value="Priority" />
                    <apex:inputField value="{!objCase.Priority}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem HelpText="{!$ObjectType.Case.fields.Support_Level__c.inlineHelpText}" >                   
                    <apex:outputLabel value="Support Level" />
                    <apex:inputField required="true" value="{!objCase.Support_Level__c}"/>
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem HelpText="{!$ObjectType.Case.fields.Time_Spent__c.inlineHelpText}">                   
                    <apex:outputLabel value="Time Spent" />
                    <apex:inputField rendered="true" value="{!objCase.Time_Spent__c}"/>
                </apex:pageBlockSectionItem> 
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Repair Time" />
                    <apex:inputField value="{!objCase.Repair_Time__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Visible in Self-Service Portal" />
                    <apex:inputField value="{!objCase.IsVisibleInSelfService}"/>
                </apex:pageBlockSectionItem>
               <!--<apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Is this an Order Issue"/>
                    <apex:inputField required="true" id="selPurchasePath" value="{!objCase.Order_Issue__c}" />                        
                </apex:pageBlockSectionItem>-->          
                <apex:pageBlockSectionItem HelpText="{!$ObjectType.Case.fields.Case_Language__c.inlineHelpText}">                   
                    <apex:outputLabel value="Case Language" />
                    <apex:inputField required="true" value="{!objCase.Case_Language__c}"/>
                </apex:pageBlockSectionItem>                
               <!--<apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Reason for Contact" />
                    <apex:inputField required="true" value="{!objCase.Reason_for_Contact__c}"/>             
                </apex:pageBlockSectionItem>-->                 
                
                <apex:pageBlockSectionItem id="pbitemPurchasepath">                   
                    <apex:outputLabel value="Purchase Path"/>
                    <apex:inputField id="selPurchasePath" value="{!objCase.Purchase_Path__c}" onchange="return setChannelPartAcc(this,'{!$Component.pbsItemCPA.txtCPA}','{!$Component.pbsItemaccName:txtAccName}');"/>                        
                </apex:pageBlockSectionItem>    
                <apex:pageBlockSectionItem >  
                </apex:pageBlockSectionItem> 
                <apex:pageBlockSectionItem id="pbsItemCPA">                   
                    <apex:outputLabel value="Channel Partner account"/>
                    <apex:outputPanel id="opchPartnerAcc">
                        <div id="dvchannelPartner">
                            <apex:inputField id="txtCPA" value="{!objCase.Channel_Partner_account__c}"/>
                        </div>
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >  
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem >  
                </apex:pageBlockSectionItem>    
                
                <apex:pageBlockSectionItem >  
                </apex:pageBlockSectionItem>
                
            </apex:pageBlockSection>    
            <apex:pageBlockSection title="Additional Information" rendered="{!isCustService}">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Region"></apex:outputLabel>
                    <apex:inputField required="true" value="{!objCase.Region__c}"/>                   
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection> 
            <apex:pageBlockSection title="Product Information" rendered="{!isCustService}">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Product"></apex:outputLabel>
                    <apex:inputField value="{!objCase.Product__c}"/>                   
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Model"></apex:outputLabel>
                    <apex:inputField id="SSKU" value="{!objCase.Model__c}" onchange="setSSKU()"/>                   
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Contract Information" rendered="{!ispivCLASS}">
                <apex:pageBlockSectionItem HelpText="{!$ObjectType.Case.fields.Serial_License_No_Lookup__c.inlineHelpText}">                   
                    <apex:outputLabel value="Serial/License No. Lookup"/>
                    <apex:inputField value="{!objCase.Serial_License_No_Lookup__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Contract"/>
                    <apex:inputField value="{!objCase.Contract__c}"/>
                </apex:pageBlockSectionItem>
                
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Case Routing" id="caseRoutingSection">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Region"></apex:outputLabel>
                    <apex:inputField required="{!If(ispivCLASS == true,false,true)}" value="{!objCase.Region__c}"/>                   
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Firmware"/>
                    <apex:inputField value="{!objCase.Firmware__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Product"/>
                    <apex:inputField required="true" value="{!objCase.Product__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Driver"/>
                    <apex:inputField value="{!objCase.Driver__c}"/>
                </apex:pageBlockSectionItem>
                 <apex:pageBlockSectionItem id="SSKUSectionItem">
                    <apex:outputLabel value="Model"></apex:outputLabel>
                    <apex:inputField id="LuModel" required="true" value="{!objCase.Model__c}" onchange="setSSKU()"/>                   
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Software"/>
                    <apex:inputField value="{!objCase.Software__c}"/>
                </apex:pageBlockSectionItem>
          
                

                
                
                
                <apex:pageBlockSectionItem >
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem rendered="{!isRCNHRecType || ispivCLASS}">                   
                    <apex:outputLabel value="OS Language"/>
                    <apex:inputField value="{!objCase.OS_Language__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem rendered="{!isRCNHRecType}">                   
                    <apex:outputLabel value="Configuration Card Part #"/>
                    <apex:inputField value="{!objCase.Configuration_Card_Part__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem rendered="{!isRCNHRecType || ispivCLASS}" >                   
                    <apex:outputLabel value="Allow Remote Support"/>                    
                    <apex:inputField value="{!objCase.Allow_Remote_Support__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem rendered="{!isPAERecType}" > 
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem rendered="{!isPAERecType}" > 
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem rendered="{!isPAERecType}" > 
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem rendered="{!isPAERecType}" > 
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:pageBlockSection Title="Lumidigm" rendered="{!IsLumidigmRecType}" id="LumidigmSection">
            <apex:pageBlockSectionItem HelpText="{!$ObjectType.Case.fields.Printer_Serial_Number_or_Asure_ID__c.inlineHelpText}">                   
                    <apex:outputLabel value="License Key/Serial Number"/>
                    
                    <!--<apex:inputField value="{!objCase.Serial_License_No_Lookup__c}"/>-->
                    <apex:inputField value="{!objCase.Printer_Serial_Number_or_Asure_ID__c}"/>
             </apex:pageBlockSectionItem>
                <apex:pageblocksectionitem >
                    <apex:outputLabel value="Module/Part #" />
                        <apex:inputField value="{!objCase.Lumidigm_Part__c}" />
                    </apex:pageblocksectionitem>
                <apex:pageblocksectionitem >
                        <apex:outputLabel value="Help Topic" />
                        <apex:inputField value="{!objCase.Help_Topic__c}" required="true"/>
                  </apex:pageblocksectionitem>
                
                    <apex:pageblocksectionitem id="sensorSkuSection">
                        <apex:outputLabel value="Sensor SKU"/>
                        <apex:inputField id="sensorSkuif" value="{!objCase.Sensor_SKU__c}" required="true"/>
                    </apex:pageblocksectionitem>
                <apex:pageblocksectionitem >
                        <apex:outputLabel value="Integration Package"/>
                        <apex:inputField value="{!objCase.Integration_Package__c}"/>
                    </apex:pageblocksectionitem>
            <apex:pageblocksectionitem >
                        <apex:outputLabel value="OS" />
                        <apex:inputField value="{!objCase.OS__c}" />
                    </apex:pageblocksectionitem>
                      
                	
                    
                    <apex:pageblocksectionitem >
                    <apex:outputLabel value="Implementation Language"/>
                    <apex:inputField value="{!objCase.Implementation_Language__c}"/>
                    </apex:pageblocksectionitem>                                              
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Description Information" id="Desc">
                <apex:pageBlockSectionItem id="DescriptionSection">                   
                    <apex:outputLabel value="Subject"/>                    
                    <apex:inputField id="subject" required="{!isCustService}" style="width:500px;" value="{!objCase.Subject}"/>
                </apex:pageBlockSectionItem>                
                <apex:pageBlockSectionItem >
                </apex:pageBlockSectionItem> 
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Description"/>                    
                    <apex:inputField style="width:450px;height:100px;" value="{!objCase.Description}"/>
                </apex:pageBlockSectionItem>
                 <apex:pageBlockSectionItem >
                </apex:pageBlockSectionItem> 
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Internal Comments"/>                    
                    <apex:inputField style="width:450px;height:100px;" value="{!objCaseComment.CommentBody}"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Resolution Information" rendered="{!!isCustService}">
                <apex:pageBlockSectionItem rendered="{!isRCNHRecType || ispivCLASS || isLumidigmRecType }">                   
                    <apex:outputLabel value="Category"/>                    
                    <apex:inputField required="true" value="{!objCase.Category__c}"/>
                </apex:pageBlockSectionItem>
                
                <apex:pageBlockSectionItem rendered="{!isPAERecType || isLaserCardRecType}">                   
                    <apex:outputLabel value="Problem Code"/>
                    
                   <apex:inputField required="true" value="{!objCase.Problem_Code_NewList__c}"/>
                </apex:pageBlockSectionItem>
                    
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Shipping Information" rendered="{!!isCustService && !ispivCLASS }">
                <apex:pageBlockSectionItem HelpText="{!$ObjectType.Case.fields.Use_Contact_Address_for_Shipping__c.inlineHelpText}">                   
                    <apex:outputLabel value="Use Contact Address for Shipping" />                    
                    <apex:inputField value="{!objCase.Use_Contact_Address_for_Shipping__c}"/>
                </apex:pageBlockSectionItem>      
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Via"/>                    
                    <apex:inputField value="{!objCase.Via__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem rendered="{!isRCNHRecType}">                   
                    <apex:outputLabel value="Shipping From HID Region"/>                    
                    <apex:inputField value="{!objCase.Shipping_From_HID_Region__c}"/>
                </apex:pageBlockSectionItem>                 
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Attention"/>                    
                    <apex:inputField value="{!objCase.Attention__c}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Shipping Account #"/>                    
                    <apex:inputField value="{!objCase.Shipping_Account__c}"/>
                </apex:pageBlockSectionItem>      
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Shipping Address"/>                    
                    <apex:inputField value="{!objCase.Shipping_Address__c}"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
 
            <apex:pageBlockSection rendered="{!isRCNHRecType}" title="Product to Ship Information">
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Product Description 1" />                    
                    <apex:inputField value="{!objCase.Product_Description_1__c}"/>
                </apex:pageBlockSectionItem>      
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Quantity 1"/>                    
                    <apex:inputField value="{!objCase.Quantity_1__c}"/>
                </apex:pageBlockSectionItem>                 
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Product Description 2" />                    
                    <apex:inputField value="{!objCase.Product_Description_2__c}"/>
                </apex:pageBlockSectionItem>      
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Quantity 2"/>                    
                    <apex:inputField value="{!objCase.Quantity_2__c}"/>
                </apex:pageBlockSectionItem><apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Product Description 3" />                    
                    <apex:inputField value="{!objCase.Product_Description_3__c}"/>
                </apex:pageBlockSectionItem>      
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Quantity 3"/>                    
                    <apex:inputField value="{!objCase.Quantity_3__c}"/>
                </apex:pageBlockSectionItem><apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Product Description 4" />                    
                    <apex:inputField value="{!objCase.Product_Description_4__c}"/>
                </apex:pageBlockSectionItem>      
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Quantity 4"/>       
                    <apex:inputField value="{!objCase.Quantity_4__c}"/>
                </apex:pageBlockSectionItem><apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Product Description 5" />                    
                    <apex:inputField value="{!objCase.Product_Description_5__c}"/>
                </apex:pageBlockSectionItem>      
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Quantity 5"/>                    
                    <apex:inputField value="{!objCase.Quantity_5__c}"/>
                </apex:pageBlockSectionItem><apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Product Description 6" />                    
                    <apex:inputField value="{!objCase.Product_Description_6__c}"/>
                </apex:pageBlockSectionItem>      
                <apex:pageBlockSectionItem >                   
                    <apex:outputLabel value="Quantity 6"/>                    
                    <apex:inputField value="{!objCase.Quantity_6__c}"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
           


 
Andy BoettcherAndy Boettcher
That's a value you typed in at some point - you're right, it doesn't exist any more and you can either rerender the correct section or remove it entirely.