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
Jon KeenerJon Keener 

Picklist Fields and Recordtypes - Having InputField show the correct list of picklist values

I'm working on a 4 step wizard for the creation of multiple records in Salesforce.
 
In step 1 of the wizard I create a variable for record of the object I'm creating.  Based on information in Step 1, in the "Init" function for step 2, I am able to assign the appropriate recordtype to the variable above.
 
In step 3, there is an inputfield shown for a picklist on the object.  Based on the fact the the recordtypeid field has been previously populated on the object variable, I was hoping that the picklist dropdown would only show the picklist values that have been set to be available for the recordtype assigned to it.  Instead, it is showing the complete list of picklist values.  I've confirmed that the recordtypeid is set properly by using an OutputText field on the same form as the picklist value and I can see that it has the correct recordtypeid.
 
I'm curious if I'm taking the right approach on this and whether this functionality isn't in place yet, or if there is a totally different approach I should be taking to have the correct picklist values become visible.
 
Thanks!
 
Jon Keener
 
 
RickyGRickyG
Jon -

I can't comment on the expected behavior of the picklist with regard to the record type, but I did create a VF page/controller that replicated dependent picklist behavior using related objects instead of the standard dependent picklist in Builder.

This implementation populated the VF list from the controller.  I would think  you could use a similar sort of workaround, where a custom object would have records with values for the picklist and an associated record type.  I know this would require duplicating some stuff you already have in your record type description, and the maintenance issues it would raise, but it should work.

Hope this helps.