0

How can I trigger a picklist change event inside salesforce:

We have the following code :

        <apex:outputPanel id="dynamicRerender">
            <apex:repeat value="{!strings}" var="eachAPI">
                <div class="dynamicClass hidden">
                    <apex:inputField value="{!Case[eachAPI]}" id="sfField"/>
                </div>
            </apex:repeat>
        </apex:outputPanel>

and then onComplete of the action function we are suppose to default the values of some of the picklist. But when we try to default the value, the dependent picklist does not show up.

 $(".IdOfTheFieldControlllingField).val('New');

I think because the controlling picklist is not able to trigger the change event. Is this manually possible?

0

Just found out its a normal change event to be triggered :

 $(".IdOfTheFieldControlllingField).trigger( "change" );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.