how can i get the dropdown list with API

Hi, everyone 

   I'm trying to find the way to get the dropdown list.

Is it possible to get the original dropdown list "account_type_dom" whit API?

Thanks for watching.

  • You can fetch that by api /<module>/enum/:field.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thanks! It works.

  • Andre, you helped me out with this answer. Slight smile

    It is worth noting that this also works for relationship fields like contact_role on Opportunity Contacts.

    Ex. 

    GET rest/v11_12/Opportunities/enum/contact_role

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    {
    "": "",
    "Primary Decision Maker": "Primary Decision Maker",
    "Business Decision Maker": "Business Decision Maker",
    "Business Evaluator": "Business Evaluator",
    "Technical Decision Maker": "Technical Decision Maker",
    "Technical Evaluator": "Technical Evaluator",
    "Executive Sponsor": "Executive Sponsor",
    "Influencer": "Influencer",
    "Other": "Other"
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    App Ecosystem @ SugarCRM