Sha256: 313882933f83d77d17bf7ddef69cd62678f343cb44b718559f494eb3da30e48f

Contents?: true

Size: 489 Bytes

Versions: 5

Compression:

Stored size: 489 Bytes

Contents

# Include your extension files here, as simple *.rb files. Here is an example of an extension:

SugarCRM::Contact.class_eval do
  def self.ten_oldest
    self.all(:order_by => 'date_entered', :limit => 10)
  end
  
  def vip?
    self.opportunities.size > 100
  end
end

# This will enable you to call

SugarCRM::Contact.ten_oldest

# to get the 10 oldest contacts entered in CRM .
# 
# You will also be able to call

SugarCRM::Contact.first.vip?

# to see whether a contact is VIP or not.

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
sugarcrm_emp-0.10.5 lib/sugarcrm/extensions/README.txt
sugarcrm_emp-0.10.1 lib/sugarcrm/extensions/README.txt
sugarcrm_emp-0.10.0 lib/sugarcrm/extensions/README.txt
sugarcrm-0.9.18 lib/sugarcrm/extensions/README.txt
sugarcrm-0.9.17 ./lib/sugarcrm/extensions/README.txt