Sha256: 420a5786c5e98c4a89cfd188c1917eb1f4304c46d672bdb0c00604105dc7f79c

Contents?: true

Size: 649 Bytes

Versions: 12

Compression:

Stored size: 649 Bytes

Contents

module SugarCRM; class Connection
  # Retrieves a single SugarBean based on the ID.
  def get_entry(module_name, id, opts={})
    login! unless logged_in?
    options = { 
      :fields => [], 
      :link_fields => [], 
    }.merge! opts
    
    json = <<-EOF
      {
        \"session\": \"#{@session}\"\,
        \"module_name\": \"#{module_name}\"\,
        \"id\": \"#{id}\"\,
        \"select_fields\": #{resolve_fields(module_name, options[:fields])}\,
        \"link_name_to_fields_array\": #{options[:link_fields]}\,
      }
    EOF
        
    json.gsub!(/^\s{6}/,'')
    SugarCRM::Response.handle(send!(:get_entry, json))
  end
end; end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sugarcrm-0.9.8 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.9.7 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.9.6 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.9.5 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.9.4 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.9.3 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.9.2 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.9.1 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.9.0 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.8.2 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.8.1 lib/sugarcrm/connection/api/get_entry.rb
sugarcrm-0.8.0 lib/sugarcrm/connection/api/get_entry.rb