chicks / sugarcrm

A ruby based REST Client for SugarCRM
MIT License
90 stars 64 forks source link

Custom fields not returning with 6.4 get_entry_list #93

Open amiorin opened 11 years ago

amiorin commented 11 years ago

http://forums.sugarcrm.com/f6/custom-fields-problem-get_entry_list-81766/

I've the same problem discussed in the forum. I've changed the gem here

diff --git a/lib/sugarcrm/connection/api/get_entry_list.rb b/lib/sugarcrm/connection/api/get_entry_list.rb
index ea564ee..b24cd7a 100644
--- a/lib/sugarcrm/connection/api/get_entry_list.rb
+++ b/lib/sugarcrm/connection/api/get_entry_list.rb
@@ -19,7 +19,7 @@ module SugarCRM; class Connection
         "query": "#{query}",
         "order_by": "#{options[:order_by]}",
         "offset": "#{options[:offset]}",
-        "select_fields": #{resolve_fields(module_name, options[:fields])},
+        "select_fields": "",
         "link_name_to_fields_array": #{options[:link_fields].to_json},
         "max_results": "#{options[:limit]}",
         "deleted": #{options[:deleted]}
@@ -28,4 +28,4 @@ module SugarCRM; class Connection
     json.gsub!(/^\s{6}/,'')
     SugarCRM::Response.handle(send!(:get_entry_list, json), @session)
   end
-end; end
\ No newline at end of file
+end; end

The workaround works. All tests pass. Do you know if they have fixed this bug in SugarCRM newest version?

amiorin commented 11 years ago

With Version 6.5.13 (Build 1041) is not affected by this problem.