I’m trying to use the REST API to get_entry_list of account names and IDs from SuiteCRM. I only need these two fields, so have specified them (from what I can see correctly in an array) in the JSON request as follows:
The query seems to be accepted by SoapHelperWebServices->checkQuery, but as soon as it hits the database, there’s a database failure:
[FATAL] Error running count query for Account List: Query Failed: SELECT count(*) c FROM accounts LEFT JOIN accounts_cstm ON accounts.id = accounts_cstm.id_c LEFT JOIN users jt0 ON accounts.modified_user_id=jt0.id AND jt0.deleted=0
AND jt0.deleted=0 LEFT JOIN users jt1 ON accounts.created_by=jt1.id AND jt1.deleted=0
AND jt1.deleted=0 LEFT JOIN users jt2 ON accounts.assigned_user_id=jt2.id AND jt2.deleted=0
AND jt2.deleted=0 LEFT JOIN accounts jt3 ON accounts.parent_id=jt3.id AND jt3.deleted=0
AND jt3.deleted=0 LEFT JOIN campaigns jt4 ON accounts.campaign_id=jt4.id AND jt4.deleted=0
AND jt4.deleted=0 where (Array) AND accounts.deleted=0: MySQL error 1054: Unknown column 'Array' in 'where clause'
Anyone seen anything similar to this before or have any ideas on how to get around it other than just asking it to return all the fields (a pretty heavy response).
Thanks Sam, it really helped me right now.
I am trying to get information from SuiteCRM using the REST API.
Would you know how to get the names and IDs of the modules that are related to a contact?
My problem is that I need to update contacts, but I want to add text inside a module connected to the contacts, like “History”, which appears below the contact fields.
All I want to know for now, is how to get the ID of the History module knowing the ID of the corresponding Contact.
As soon as I have that I know what to do…
I was finally able to get this to work.
I had to make sure the “deleted”:“false” and “max_records”:“0” were included, but they had to be in front of the “selected_fields”:[“created_by_name”,“status”]. The quotes must also be double quotes single quotes do not work.
It appears that the API works but is very picky about the placement of each variable.
Here was my final URL. I have separated it out to make it more readable.