You need to sign in to do that
Don't have an account?

Dependent pick list - contact or user
I am developing custom event organization implementation. I have a requirement to have ability to pick either user or contact
organizer type - Internal (User) contractor(Contact) Other
(1) can I present user with pick list When Internal selected
Then a look up will be user User lookup
(2) When Picklist selection is Contractor
then user will have contact Lookup
I can write custom code, any suggestions?
organizer type - Internal (User) contractor(Contact) Other
(1) can I present user with pick list When Internal selected
Then a look up will be user User lookup
(2) When Picklist selection is Contractor
then user will have contact Lookup
I can write custom code, any suggestions?
How can I show only Contact lookup or user lookup but not both
I've chosen this dependency on the case Object where a picklist value determines what Lookup the user will see - User/Contact:
<apex:page standardController="Case">
<apex:form >
<apex:pageBlock id="Dependentfields">
<apex:pageBlockSection >
<apex:actionRegion >
<apex:inputField id="Picklist" value="{!case.Connect_With__c}" required="true" >
<apex:actionSupport event="onchange" rerender="Dependentfields" />
</apex:inputField>
</apex:actionRegion>
</apex:pageBlockSection>
<apex:pageBlockSection id="lookup1" rendered="true">
<apex:inputField id="user" value="{!case.User_connect__c}" rendered="{!IF(case.Connect_With__c ='User',true,false)}"/>
</apex:pageBlockSection>
<apex:pageBlockSection id="lookup2" rendered="true">
<apex:inputField id="contact" value="{!case.ContactID}" rendered="{!IF(case.Connect_With__c ='Contact',true,false)}"/>
</apex:pageBlockSection>
</apex:PageBlock>
</apex:form>
</apex:page>