Get contact custom fields

I need to create sugar contacts to my application. For that I try to use the Sugar API but I didn't find an option to get the contacts custom fields.

Is it possible to get contact custom fields with the Sugar API? 

Thanks!

Parents Reply Children
  • Hi André Lopes

    Thanks to replay me,

    i want to to fetch list of all custom fields defined in the Contacts module. so is there any API for that ?

    i want to get result like :- 

    fields: [{ "name":"first_name""label":"First Name",  "required_for_agents":true,  "type":"default_first_name", "dbType": "varchar", .....},

    {"name":"last_name","label":"Last Name""type":"default_last_name", "dbType": "varchar",....},....
    ]

  • When you are logged in you can call the REST service 

    .../rest/v10/metadata?type_filter=modules&module_filter=<modulename>

    e.g. 

    .../rest/v10/metadata?type_filter=modules&module_filter=Accounts

    to get all metadata of a module.

    The result looks like this:

    {
    "_hash": "d587703986a2a01bf679750a221a7fbe",
    "modules": {
    "Accounts": {
    "fields": {
    "id": {
    "name": "id",
    "vname": "LBL_ID",
    "type": "id",
    "required": true,
    "reportable": true,
    "duplicate_on_record_copy": "no",
    "comment": "Unique identifier",
    "mandatory_fetch": true
    }, ...

    The custom fields have the attribute 

      "custom_module": "<module_name>",

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH