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
  • Hi Maulik Chauhan 

    What do you really want to accomplish?

    To fetch custom fields values given a Contact or

    To fetch list of all custom fields defined in the Contacts module?

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • 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

Reply
  • 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

Children