Table of Contents Previous Next

Sugar Developer Guide

Version 5.1


Chapter 2 Application Framework : Web Services : Get a list of records for a module

Get a list of records for a module
This will return a list of entries (results) for a list view of a module. Team-based security restrictions determine the resulting set of rows. It should also be noted that only the fields available in the module’s list view is available through the get_entry_list call. Note that restrictions to field access implemented via field-level ACLs (Professional and Enterprise Editions only) do not affect the fields returned.
Call: get_entry_list
o
string:session – this is the session_id
o
string:module_name – this is the module you wish to get results for (e.g. 'Calls')
o
string:query – this is the search query you wish to apply in retrieving the results (e.g. “(calls.name LIKE 'doctor appointment%' AND calls.date_start = CURDATE())” )
o
string:order_by – this is what you would like to order by for the results (e.g. the database column “calls.name”)
o
complex-type:select_fields – these are the fields you want returned. SugarSoap performance is better if you only retrieve the fields you need (e.g. name, description, date_start, time_start).
o
int:max_results – this is the maximum number of results you want returned if set to 0 it will return the default SugarSoap API’s amount for ListViews.
o
New complex types introduced in this section include:
select_fields is an array of strings (these are the names of fields for a given module)
get_entry_list_result is an struct containing five parameters.
o
int:result_count – the number of results returned
o
int:next_offset – the next offset to use in a request
o
complex-type:field_list – this is meta data of the fields returned
o
complex-type:entry_list – this is the acctual result data
o
complex-type:error (error_value) any errors that occurred
field_list is an array of complex-type:field
o
field is a struct containing five parameters.
string:name – the db/sugar name for a field
string:type – the type of field (enum, text)
string:label – the translated label for the field
int:required – 1 for required 0 for not
complex-type:name_value_list – these are additional options such as for enumeration it would be the list of values for the enumeration.
o
name_value_list is an array of complex-type:name_value
name_value is a struct containing two parameters. This is a name value pair.
string:name – the name of the value (a.k.a key)
string:value – the value for the name
entry_list is an array of complex-type:entry_value
o
entry_value is a struct containing three parameters:
string:id – the sugar id for the entry
string:module_name – the module this entry is from
complex-type:name_value_list – the field values for this entry

Table of Contents Previous Next

Copyright 2004-2008 SugarCRM Inc.
Product License