I am trying to get all contacts from the active opportunities below is my request of SugarCRM API v4
{
"session":"btcskfetq7sqshio3uv568d8c1",
"module_name":"Contacts",
"query":"contacts.id IN (
SELECT opportunities_contacts.contact_id
FROM opportunities_contacts
JOIN opportunities
ON opportunities_contacts.opportunity_id = opportunities.id
WHERE opportunities.sales_stage
NOT IN ('Closed Won','Closed Lost'))",
"order_by":"",
"offset":0,
"select_fields":[
"first_name",
"last_name",
"title",
"phone_home",
"phone_work",
"status",
"email"
],
"link_name_to_fields_array":null,
"max_results":0,
"deleted":0,
"favorites":false
}
my query is working fine in mysql workbench in sugarCRM database but the API response is:
{"name":"Access Denied","number":40,"description":"You do not have access"}
Can you help?
To Achive this you to write Your own end point in suagrcrm .
For More Details Read this :
Read me ...