Sha256: 122fe4589b5fddcb9b0e3937bf98ff211e4962f2d7e6b2bc2b7594b9da309874

Contents?: true

Size: 657 Bytes

Versions: 4

Compression:

Stored size: 657 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\": \"#{@session}\"\,
      \"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))
end
end; end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sugarcrm-0.7.9 lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.7.8 lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.7.7 lib/sugarcrm/connection/api/get_entries.rb
sugarcrm-0.7.2 lib/sugarcrm/connection/api/get_entries.rb