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
B VenkatB Venkat 

Problem with Picklist?

Hi All,

I have Location__C custom object in that one multiselect picklist called Payment Mode(CC,ACH,Check)is there.
I have Student__C custom object it is lookup to Location__C.In this Student__c object i have Picklist called Payment Mode(CC,ACH,Check).

Requirement is In Location Object if i select 2 values of Multiselect Picklist in Student__c object also it has to Show 2 Values of same.

Here Student__c Edit page and Detail pages are Visualforce pages.

Thanks,
Venkat
 
Phil WeinmeisterPhil Weinmeister
Hi Venkat,

I read through your requirement; what is the actual problem that you encountered?

Thanks,
Phil
B VenkatB Venkat
Hi Phil Weinmeister,

Whatever the values i selected in Location__C object only those values needs to display in Student__c object picklist
Shaijan ThomasShaijan Thomas
Create a custom picklist for student Payment Mode. ie. Get the values from Location and create picklist, and display in UI
Thanks
Shaijan
Phil WeinmeisterPhil Weinmeister
Hi Venkat,

Got it, thanks.

If you want to limit the displayed values on Student__c to the values selected on Location__c, you'll have to do that with the VF controller. You'll have to query the related Location__c record and show only those values in your Student VF page for Payment Mode.

If you want to avoid code for this and have a configuration-based solution, you could create a formula field to show the Location values on Student and also create a validation rule to ensure that only values from Location can be selected. Obviously, not perfect, but quick approach.

Thanks,
Phil
B VenkatB Venkat
Hi Phil,

I Query the related record but problem is where can i place the code in VF page.

Thanks,
A.Jagadeesh