Sha256: e60855bc6eec3bf1ec059d5311da948c8f13bd63ada97234241ed9dc9eb514aa

Contents?: true

Size: 701 Bytes

Versions: 10

Compression:

Stored size: 701 Bytes

Contents

module SugarCRM; class Connection
  # Retrieve a list of SugarBeans by ID.  This method will not 
  # work with the report module.
  def get_entries(module_name, ids, opts={})
    login! unless logged_in?
    options = { 
      :fields => [], 
      :link_fields => [], 
    }.merge! opts

    json = <<-EOF
      {
        "session": "#{@sugar_session_id}",
        "module_name": "#{module_name}",
        "ids": #{ids.to_json},
        "select_fields": #{resolve_fields(module_name, options[:fields])},
        "link_name_to_fields_array": #{options[:link_fields].to_json}
      }
    EOF
    json.gsub!(/^\s{6}/,'')
    SugarCRM::Response.handle(send!(:get_entries, json), @session)
  end
end; end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
sugarcrm_emp-0.10.5 lib/sugarcrm/connection/api/get_entries.rb
sugarcrm_emp-0.10.1 lib/sugarcrm/connection/api/get_entries.rb
sugarcrm_emp-0.10.0 lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.9.18 lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.9.17 ./lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.9.16 ./lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.9.15 ./lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.9.14 ./lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.9.13 ./lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.9.12 ./lib/sugarcrm/connection/api/get_entries.rb