0

2 Objects :- Account And Products with 1:m relationship

Account Fields:- Account Name,Account Country (Picklist)

Product Fields:- Product Name(Multiselect Picklist), Product Description


Account Country values:- India, Pakistan, China, Australia

Product Name values:- Product 1, Product 2, Product 3, Product 4, Product 5, Product 6


Dependency:-

  • India

    --- Product 1, Product 2

  • Pakistan

    --- Product 1, Product 3, Product 5

  • China

--- Product 1, Product 6

  • Australia

    --- Product 4, Product 5, Product 6


On vf page 2 Fields Account Country as dropdown and All Products displayed as checkbox.

Checkboxes would be rendered based on the country selected.(Display only those products for the country selected)

Created a custom setting to store Country and Products.

Want to retrieve values accordingly.

  • So ... what is your question ? While you're giving a lot of background details, it's unclear to me where your issue is and what type of answer you're expecting. – Samuel De Rycke Oct 30 '13 at 9:43
  • I want to achieve this using apex code.. and i am stuck up on how i traverse through custom setting values – response Oct 30 '13 at 9:53
  • You add an actionsupport on the select that calls a pagereference method in the controller. In this method you select the products you want to display for that country. – Marcel Meijer Oct 30 '13 at 9:55
  • I assume you are not able to access the values from a custom setting. If so, please use this link to know about fetching values from a custom setting. help.salesforce.com/apex/… – Vijay Prakash Oct 30 '13 at 9:58
  • Thanks vijay.. this link helped me out and i am able to write the code – response Oct 31 '13 at 9:03

Your Answer

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

Browse other questions tagged or ask your own question.