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
Jyosi jyosiJyosi jyosi 

Apex Command Button reRender Help

Hello Everyone,

I am implementing the duplication rule using Data.com methods.I was able to get the Error message and all other details in visualforce page.
User enter some information to check whether the values is duplicate below or not the section below  where the user enter the data for verification
 <apex:pageBlockSection title="Contact Information" collapsible="true" columns="2">   
               
         <apex:inputCheckbox value="{!DupeCheck}" label="SkipDupeCheck"><apex:actionSupport event="onchange" reRender="DupeCheckOutputPanel" id="Us"/>
                </apex:inputCheckbox>
                <apex:inputField value="{!con.Title}"/>            
                <apex:inputField value="{!con.Gender__c}"/>
                <apex:inputField value="{!con.FirstName}" required="True"/>
                <apex:inputField value="{!con.Phone}" />
                <apex:inputField value="{!con.LastName}" />
                <apex:inputField value="{!con.MobilePhone}" />
                <apex:inputField value="{!con.Sample_Shipping_Street__c}" id="shpstreet1" required="true"/>
                <apex:inputField value="{!con.Sample_Shipping_Street2__c}" id="shpstreet2"/>
                <apex:inputField value="{!con.Sample_Shipping_Mail_Stop_Suite__c}" id="shpunit"/>
                <apex:inputField value="{!con.Sample_Shipping_City__c}" id="shpcity" required="true"/>
                <apex:inputField value="{!con.Sample_Shipping_State_Province__c}" id="shpstate" required="true"/>
                <apex:inputField value="{!con.Sample_Shipping_Zip_Postal_Code__c}" id="shpzip" required="true"/>
                <apex:inputField value="{!con.Sample_Shipping_Country__c}" id="shpcountry" required="true"/> <!-- updated from smpcountry -->
              </apex:pageBlockSection>

once the user enters the data and verify duplication i need to display the below section

<apex:outputPanel id="DupeCheckOutputPanel">
            <apex:pageBlockSection title="Relationships" collapsible="true" columns="2"  rendered="{!IF(hasDuplicateResult = true , true , false)}" > 
              <apex:outputText value="&nbsp;" escape="false" />
                <apex:inputField value="{!con.Fax}" />
                <apex:inputField value="{!con.Alternate_Street__c}" id="altstreet1"/>
                <apex:inputField value="{!con.Alternate_Zip_Postal_Code__c}" id="altzip" />
                
I get the above the section when user has duplicate records in system. but i need to show this when they are no duplication in system too when user clicks verify duplication.

Below are the command button

<apex:commandButton  value="Verify Duplication"  action="{!Save}"  />
          <!--      <apex:commandButton value="Cancel"  action="{!Cancel}" immediate="true" />-->
               <apex:commandButton value="Cancel"  onClick="closeTab();return false" />


Thanks for the help.

Regards,
Jyo