Is there any way to fetch picklist values based on a record type. I am wondering how salesforce does it. I am fetching list of record types via ForceTK, next i want to fetch picklist values based on a record type. ForceTK gives all information about an object metadata but i could not find any filtering based on record type.

I'm using the code below to fetch the metadata for my custom object.

var client = new forcetk.Client();
// Get the token from Visualforce

    function(request, status, response){



2 Answers 2


Not sure about ForceTK ,may be this is not implemented by library yet or safe harbour and I am not sure .

But normally through standard REST API we can implement this using below REST Service


For different object you can change Object name and versions


I just checked my dev console and it does return values as expected .There is a recordtype mappings that can give you various picklists needed

enter image description here

I see you are using visualforce and hence if you use visualforce you can directly call this REST API from Visualforce using Jquery and it will not require any ForceTK(Although I love forceTk)

     <apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"/>
     jQuery(document).ready(function($) {
     // Pull 10 Accounts via the REST API
      beforeSend: function(xhr) {
        // Set the OAuth header from the session ID
        xhr.setRequestHeader('Authorization', 'Bearer {!$Api.Session_ID}');
      success: function(response) {
        // We got 'em - append our records to the HTML list
        $.each(response.records, function(index, record) {
      error: function(jqXHR, textStatus, errorThrown) {
        // Oops - what went wrong?
        alert(jqXHR.status + ': ' + errorThrown);
   <h1>Test REST API Without Proxy</h1>
        <ul id="responselist">
  • Hi Mohith, thanks for a real quick response. I tried to replicate your example but i am getting an empty array for the raw response. Please find the image below. Am i missing something. i.imgur.com/8vWgDgh.png
    – user477
    Commented Jun 22, 2015 at 19:22
  • @sangram Looks like you dont have recordtypes for accounts assigned to admin profile .You need recordtypes for account to check. Commented Jun 22, 2015 at 19:28
  • Thanks Mohith, well i have a custom object for which there are a few record types. And i'm getting the same null array response. Both in workbench as well as apigee console. Is there any other way, like some metadata api usage or something similar.
    – user477
    Commented Jun 22, 2015 at 19:36
  • @sangram I cant spoon feed .From my answer its clear you need to add your object name in the URL '/services/data/v33.0/sobjects/ObjectName/describe/layouts/' Commented Jun 22, 2015 at 19:52

I finally figured it out via Ajax Toolkit. Thanks for all the answers but using Ajax Toolkit, one could perform a SOAP call and get all metadata information of an object, e.g. The specific piclist values for each record type.

var result = sforce.connection.describeLayout('Liability_Information__c');
console.log(result); //parse this object to find picklist values for each record type

You must log in to answer this question.