jsforce icon indicating copy to clipboard operation
jsforce copied to clipboard

Decoding Dependent picklists "validfor" values?

Open mbarzeev opened this issue 8 years ago • 2 comments

Hi, We're getting Picklist values from the field's describe, but as you know some Picklists are dependent on others to filter their options ("controllerName"). The filter is done using a base64 encoded bitmap each Picklist value has ("validFor"). I'm trying to figure out if there is an easy way to decode this bitmap with your library. I couldn't find a way to do so :( Are there any best-practices you would recommend on doing that?

Thanks

mbarzeev avatar Aug 10 '17 09:08 mbarzeev

I struggle with this, too...

Hellwest avatar Aug 23 '21 12:08 Hellwest

You could possibly look into the UI API, which might provide better responses for this (but might still have other complications): https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_features_records_dependent_picklist.htm

Since there are no built ins for calling the UI api, you would need to use the method mentioned here: https://github.com/jsforce/jsforce/issues/934#issuecomment-546714813

paustint avatar Aug 23 '21 20:08 paustint