Skip to main content
deleted 2 characters in body
Source Link

I am trying to reset a dependent multi-select picklist(Narrative_of_Type__c) on change of a picklist(Case_Type__c) value in a VF page. But I am not able to reset(i.e. removing the selected values) it when a I select a different value from the master picklist. Whereas I tried for a independent multiselect picklist which gets nullified with the same logic in controller. Any reason for this ?

Given below the code: VF Page:

<apex:pageblockSection title="Request Type" columns="1">
<apex:inputField value="{!Case.Case_Type__c}">
    <apex:actionSupport event="onchange" action="{!nullifyRequestSection}" reRender="panelFirstid"/>
</apex:inputField></apex:pageblockSection>
<apex:outputPanel id="panelFirstid">
<apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}"> 
    <apex:inputField value="{!Case.Narrative_of_Type__c}"/>
</apex:pageblockSection>

</apex:outputPanel>

Apex class:

public class Case_Controller{ private final Case testCase;

public class Case_Controller{
private final Case testCase;
public Case_Controller(ApexPages.StandardController stdController) {
    this.testCase = (Case)stdController.getrecord();
}
 
public PageReference nullifyRequestSection(){
    testCase.Narrative_of_Type__c = null;
    //testCase.Narrative_of_Type__c = '';
}

}

Please suggest any solution you have for this issue. Thanks a lot in advance.

I am trying to reset a dependent multi-select picklist(Narrative_of_Type__c) on change of a picklist(Case_Type__c) value in a VF page. But I am not able to reset(i.e. removing the selected values) it when a I select a different value from the master picklist. Whereas I tried for a independent multiselect picklist which gets nullified with the same logic in controller. Any reason for this ?

Given below the code: VF Page:

<apex:pageblockSection title="Request Type" columns="1">
<apex:inputField value="{!Case.Case_Type__c}">
    <apex:actionSupport event="onchange" action="{!nullifyRequestSection}" reRender="panelFirstid"/>
</apex:inputField></apex:pageblockSection>
<apex:outputPanel id="panelFirstid">
<apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}"> 
    <apex:inputField value="{!Case.Narrative_of_Type__c}"/>
</apex:pageblockSection>

</apex:outputPanel>

Apex class:

public class Case_Controller{ private final Case testCase;

public Case_Controller(ApexPages.StandardController stdController) {
    this.testCase = (Case)stdController.getrecord();
}
 
public PageReference nullifyRequestSection(){
    testCase.Narrative_of_Type__c = null;
    //testCase.Narrative_of_Type__c = '';
}

}

Please suggest any solution you have for this issue. Thanks a lot in advance.

I am trying to reset a dependent multi-select picklist(Narrative_of_Type__c) on change of a picklist(Case_Type__c) value in a VF page. But I am not able to reset(i.e. removing the selected values) it when a I select a different value from the master picklist. Whereas I tried for a independent multiselect picklist which gets nullified with the same logic in controller. Any reason for this ?

Given below the code: VF Page:

<apex:pageblockSection title="Request Type" columns="1">
<apex:inputField value="{!Case.Case_Type__c}">
    <apex:actionSupport event="onchange" action="{!nullifyRequestSection}" reRender="panelFirstid"/>
</apex:inputField></apex:pageblockSection>
<apex:outputPanel id="panelFirstid">
<apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}"> 
    <apex:inputField value="{!Case.Narrative_of_Type__c}"/>
</apex:pageblockSection>

</apex:outputPanel>

Apex class:

public class Case_Controller{
private final Case testCase;
public Case_Controller(ApexPages.StandardController stdController) {
    this.testCase = (Case)stdController.getrecord();
}
public PageReference nullifyRequestSection(){
    testCase.Narrative_of_Type__c = null;
    //testCase.Narrative_of_Type__c = '';
}

}

Please suggest any solution you have for this issue. Thanks a lot in advance.

added 2 characters in body
Source Link

I am trying to reset a dependent multi-select picklist(Narrative_of_Type__c) on change of a picklist(Case_Type__c) value in a VF page. But I am not able to reset(i.e. removing the selected values) it when a I select a different value from the master picklist. Whereas I tried for a independent multiselect picklist which gets nullified with the same logic in controller. Any reason for this ?

Given below the code: VF Page:

<apex:pageblockSection title="Request Type" columns="1">
<apex:inputField value="{!Case.Case_Type__c}">
    <apex:actionSupport event="onchange" action="{!nullifyRequestSection}" reRender="panelFirstid"/>
</apex:inputField>inputField></apex:pageblockSection>
<apex:outputPanel id="panelFirstid">
<apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}"> 
    <apex:inputField value="{!Case.Narrative_of_Type__c}"/>
</apex:pageblockSection>

</apex:pageblockSection>
<apex:outputPanel id="panelFirstid"> <apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}"> <apex:inputField value="{!Case.Narrative_of_Type__c}"/> </apex:pageblockSection> </apex:outputPanel>

Apex class:

public class Case_Controller{ private final Case testCase;

public Case_Controller(ApexPages.StandardController stdController) {
    this.testCase = (Case)stdController.getrecord();
}

public PageReference nullifyRequestSection(){
    testCase.Narrative_of_Type__c = null;
    //testCase.Narrative_of_Type__c = '';
}

}

Please suggest any solution you have for this issue. Thanks a lot in advance.

I am trying to reset a dependent multi-select picklist(Narrative_of_Type__c) on change of a picklist(Case_Type__c) value in a VF page. But I am not able to reset(i.e. removing the selected values) it when a I select a different value from the master picklist. Whereas I tried for a independent multiselect picklist which gets nullified with the same logic in controller. Any reason for this ?

Given below the code: VF Page:

<apex:pageblockSection title="Request Type" columns="1">
<apex:inputField value="{!Case.Case_Type__c}">
    <apex:actionSupport event="onchange" action="{!nullifyRequestSection}" reRender="panelFirstid"/>
</apex:inputField>

</apex:pageblockSection>
<apex:outputPanel id="panelFirstid"> <apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}"> <apex:inputField value="{!Case.Narrative_of_Type__c}"/> </apex:pageblockSection> </apex:outputPanel>

Apex class:

public class Case_Controller{ private final Case testCase;

public Case_Controller(ApexPages.StandardController stdController) {
    this.testCase = (Case)stdController.getrecord();
}

public PageReference nullifyRequestSection(){
    testCase.Narrative_of_Type__c = null;
    //testCase.Narrative_of_Type__c = '';
}

}

Please suggest any solution you have for this issue. Thanks a lot in advance.

I am trying to reset a dependent multi-select picklist(Narrative_of_Type__c) on change of a picklist(Case_Type__c) value in a VF page. But I am not able to reset(i.e. removing the selected values) it when a I select a different value from the master picklist. Whereas I tried for a independent multiselect picklist which gets nullified with the same logic in controller. Any reason for this ?

Given below the code: VF Page:

<apex:pageblockSection title="Request Type" columns="1">
<apex:inputField value="{!Case.Case_Type__c}">
    <apex:actionSupport event="onchange" action="{!nullifyRequestSection}" reRender="panelFirstid"/>
</apex:inputField></apex:pageblockSection>
<apex:outputPanel id="panelFirstid">
<apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}"> 
    <apex:inputField value="{!Case.Narrative_of_Type__c}"/>
</apex:pageblockSection>

</apex:outputPanel>

Apex class:

public class Case_Controller{ private final Case testCase;

public Case_Controller(ApexPages.StandardController stdController) {
    this.testCase = (Case)stdController.getrecord();
}

public PageReference nullifyRequestSection(){
    testCase.Narrative_of_Type__c = null;
    //testCase.Narrative_of_Type__c = '';
}

}

Please suggest any solution you have for this issue. Thanks a lot in advance.

Source Link

Reset a dependent multiselect picklist on change of a master picklist values

I am trying to reset a dependent multi-select picklist(Narrative_of_Type__c) on change of a picklist(Case_Type__c) value in a VF page. But I am not able to reset(i.e. removing the selected values) it when a I select a different value from the master picklist. Whereas I tried for a independent multiselect picklist which gets nullified with the same logic in controller. Any reason for this ?

Given below the code: VF Page:

<apex:pageblockSection title="Request Type" columns="1">
<apex:inputField value="{!Case.Case_Type__c}">
    <apex:actionSupport event="onchange" action="{!nullifyRequestSection}" reRender="panelFirstid"/>
</apex:inputField>

</apex:pageblockSection>
<apex:outputPanel id="panelFirstid"> <apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}"> <apex:inputField value="{!Case.Narrative_of_Type__c}"/> </apex:pageblockSection> </apex:outputPanel>

Apex class:

public class Case_Controller{ private final Case testCase;

public Case_Controller(ApexPages.StandardController stdController) {
    this.testCase = (Case)stdController.getrecord();
}

public PageReference nullifyRequestSection(){
    testCase.Narrative_of_Type__c = null;
    //testCase.Narrative_of_Type__c = '';
}

}

Please suggest any solution you have for this issue. Thanks a lot in advance.