Module: SoqlGlobalData

Included in:
Salesforce, SoqlData
Defined in:
lib/leap_salesforce/soql_data/soql_global_data.rb

Overview

Global Methods to interact with Soql Data

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ids_to_deleteObject

Returns the value of attribute ids_to_delete.



5
6
7
# File 'lib/leap_salesforce/soql_data/soql_global_data.rb', line 5

def ids_to_delete
  @ids_to_delete
end

Instance Method Details

#global_describeExchange

Describe all salesforce objects (this returns BIG response) See developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_describeGlobal.htm for reference

Examples:

Count how many sobjects there are

objects = SoqlData.global_describe['sobjects']
objects.size

Find description of object with label Organisation

org_desc = SoqlData.global_describe['sobjects'].find { |obj| obj['label'] == 'Organisation' }

Find names of all objects that include ‘File’ in their label

SoqlData.global_describe['sobjects'].find_all { |obj| obj['label'].include? 'File' }.collect { |f| f['name'] }

Returns:

  • (Exchange)

    Global describe of salesforce Objects



25
26
27
# File 'lib/leap_salesforce/soql_data/soql_global_data.rb', line 25

def global_describe
  @global_describe ||= SoqlData.new('Global describe of sobjects', method: :get, suburl: 'sobjects/')
end

#limitsExchange

Examples:

See Conga limits

SoqlData.limits["['Conga Composer - EU']"]

Returns:

  • (Exchange)

    Limits of Salesforce ORG



11
12
13
# File 'lib/leap_salesforce/soql_data/soql_global_data.rb', line 11

def limits
  @limits ||= SoqlData.new("#{self} limits", method: :get, suburl: 'limits/')
end