How do we find out the unique fieldname in sugar crm?

Hi there ,

 I have two queries on Sugar CRM meta.

I used Rest api to get the fields from sugar

GET /rest/metadata?type_filter=modules,relationships&module_filter=Calls.

Response :

{"modules":
{"Calls":
{"fields":
{"leads": {
"name": "leads",
"type": "link",
"relationship": "calls_leads",
"source": "non-db",
"vname": "LBL_LEADS"
},
"lead_id": {
"name": "lead_id",
"type": "relate",
"rname": "id",
"vname": "LBL_LEAD_ID",
"link": "leads",
"source": "non-db",
"studio": false
},
"lead_name": {
"name": "lead_name",
"rname": "name",
"db_concat_fields": [
  "first_name",
  "last_name"
],
"id_name": "lead_id",
"massupdate": false,
"vname": "LBL_LEAD_NAME",
"type": "relate",
"link": "leads",
"table": "leads",
"isnull": "true",
"module": "Leads",
"join_name": "leads",
"dbType": "varchar",
"source": "non-db",
"importable": "false",
"studio": false
},

Queries : 

1. Which field - name/id_name is unique for all fields? 

2.  all the relate type fields have module ? i got the response which has lead_id without module ? 

Parents
  • Lets talk about relate fields on SugarCRM:

    <field>_name : indicates the name of related record. This field has as attributes the module and 'link'. The attribute 'link' points to another field which means "a list of related records" and it points to a real relationship.

    <field>_id : indicates the foreign key, that means, this is the field to be populated

    The integrated application needs to cary about the id_name field.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • Lets talk about relate fields on SugarCRM:

    <field>_name : indicates the name of related record. This field has as attributes the module and 'link'. The attribute 'link' points to another field which means "a list of related records" and it points to a real relationship.

    <field>_id : indicates the foreign key, that means, this is the field to be populated

    The integrated application needs to cary about the id_name field.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children
No Data