+ Start a Discussion
carloecarloe 

looking for a suggestion with picklist values and pages

Hi there,

I'm looking for a suggestion or a better way that we can implement this requirement:

 

 

We have a picklist of our products and they will be displayed on a customer facing visualforce page with a "next" button. Let's say the picklist values are:

 

Product A

Product B 

Product C

 

Product A is the most recent version and therefore we wanted to display a 'premium' content page when the "Next" is clicked. Products B and C are considered obsolete will go to another page that is more of a common page than what Product A has.

 

Now, this is not a problem to simply redirect to a different page based on the picklist value, we can use JS to accomplish that or rendered outputpanels.

 

Our challenge is to make this scallable since Product A may become obsolete in the future and we will add another product in the list (say, Product X)

 

What we dont want to end up with is to edit the pages every time we release a new product just in order to redirect it to the premium page. Not to mention doing this for multiple "latest version" products in different product lines.

 

 

Is there a way that we could tag particular products (using maybe another field) and just use that to reference in our pages to display our premium pages? The goal is to have something that we can edit in the object level (for us it's Case) rather than edit the visualforce pages every time we launch a new product.

 

Hope that make sense.

Thanks

 

 

 

 

 

 

PrakashbPrakashb

One suggestion would be to have another field on your Product object and while adding your picklist to your page,

you can add,the field value and the product name.

 

So when a user selects a particular product, at the back end you will have the value of the field say for ex premium or obsolete and based on that you can redirect to different pages.

 

this works when all your premium products are redirectd to one page and need not depend on which product has been selected.

 

 

 

carloecarloe

Hi Prakashb,

 

Thanks for the suggestion. Unfortunately we're not using Product object at the moment. I should clarify that in our Case object, we created a custom picklists called:

 

Product Family

-Product Group

--Version

 

They also have dependencies as described in the hierarchy above. Under each product group are the most 'recent' versions of our products and that's what we want to redirect to a new page.

 

The same custom picklists are display on our pages and there is no relation with our Products object.

 

Originally what I was thinking was to create another custom picklist called "support policy" and put that in a dependency under Version.

 

Product Family

-Product Group

--Version

---Support Policy

 

This would contain the policy (or reference if you will) on how the page will be redirected. (Premium, Support, Obsolete) then make this a hidden field in the page. The only problem is that even if the Version picklist has only one dependent value in Support Policy, it defaults to NONE.

 

Would you know if there is a way to auto-select the first picklist value when a field is changed?