Rest API filter

Hello,

I am making a request to the Contacts module. Sugar only has two contacts in the system. One contains the word Smith for the Contact name. The filter does not seem to apply as all the records are returned - two in this case. Is there something that needs to be setup on the sugar side?

http://FQDN/sugarcrm/rest/v11_4/Contacts/filter 

POST:

{ "filter":[ { "name":{ "$contains":"Smith" } } ] }

Parents
  • Hi Peter Sitina,

    My initial idea, without having an opportunity to personally test this, is that people modules (Contacts, Leads, Targets) have first_name and last_name fields. They do not have a single name field, at least not on the database level.

    The application concatenates first and last name in the user interface to dynamically generate a name field for these modules. This dynamic name field, not being static data saved to the database, might not be usable as a filter. Perhaps you have to filter on first_name and last_name specifically.

    I hope this is helpful.

Reply
  • Hi Peter Sitina,

    My initial idea, without having an opportunity to personally test this, is that people modules (Contacts, Leads, Targets) have first_name and last_name fields. They do not have a single name field, at least not on the database level.

    The application concatenates first and last name in the user interface to dynamically generate a name field for these modules. This dynamic name field, not being static data saved to the database, might not be usable as a filter. Perhaps you have to filter on first_name and last_name specifically.

    I hope this is helpful.

Children
No Data