chicks / sugarcrm

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

Getting false on .first queries to tables that contain data #19

Closed frugardc closed 13 years ago

frugardc commented 13 years ago

Getting no results after successfully creating an Opportunity. I've tried the typical Repair and Relationship rebuild options. Not sure how to debug this...

irb(main):020:0> s = SugarCRM::Opportunity.new

...filling out required fields...

irb(main):032:0> s.save => true

irb(main):035:0> SugarCRM::Opportunity.first

=> false

irb(main):036:0> SugarCRM::Opportunity.all

=> []

Also... Other modules such as Accounts DO work...

irb(main):037:0> SugarCRM::Account.first => #<SugarCRM::Account account_type: "", annual_revenue: "", assigned_user_id: "1", assigned_user_name: "CRM Support", billing_address_city: "", billing_address_country: "", billing_address_postalcode: "", billing_address_state: "", billing_address_street: "", billing_address_street_2: nil, billing_address_street_3: nil, billing_address_street_4: nil, campaign_id: "", campaign_name: "", cdb_updated_at_c: "", created_by: "1", created_by_name: "CRM Support", date_entered: "2010-11-29 19:51:25", date_modified: "2010-12-31 15:53:56", deleted: false, description: "", email1: "", email_opt_out: false, employees: "", id: "51f296dd-0efb-817b-cc26-4cf40442e865", industry: "", invalid_email: false, modified_by_name: "CRM Support", modified_user_id: "1", name: "Boo Industries", ownership: "", parent_id: "", parent_name: "", phone_alternate: "", phone_fax: "", phone_office: "", rating: "", shipping_address_city: "", shipping_address_country: "China", shipping_address_postalcode: "", shipping_address_state: "", shipping_address_street: "", shipping_address_street_2: nil, shipping_address_street_3: nil, shipping_address_street_4: nil, sic_code: "", team_count: "1", team_id: "2c4a6ca3-7e8e-4d63-3e07-4cd30c089e30", team_name: "CRM Support", team_set_id: "2c4a6ca3-7e8e-4d63-3e07-4cd30c089e30", ticker_symbol: "", view_website_c: "", website: "http://">

davidsulc commented 13 years ago

Can you tell us which version of the gem you're using?

Also, can you see the Opportunity in CRM (i.e. does it really get saved in CRM or not)? In other words, is the real issue that the gem is reporting successful creation when it's not the case, or is the query for a valid gem not returning the result it should...

frugardc commented 13 years ago

Hmm. After checking, I see that it doesn't save. That said, there are plenty of opportunities in there that are not being picked up. I just tried it with the 0.98 gem

frugardc commented 13 years ago

I have verified that it is something specific to my system. I pointed at another test system, and was able to get results. I am wondering if there are errors occurring in the background that are being handled that I could be able to see somehow...

davidsulc commented 13 years ago

I verified your test case works as expected on HEAD.

Maybe if you set SugarCRM.connection.debug = true in your script it might shed some light on the issue you have?

Also, set SugarCRM to development mode (in the admin console) and check your logs.

frugardc commented 13 years ago

fails parsing JSON

irb(main):004:0> SugarOpportunity.first get_entry_list: Request: method=get_entry_list&input_type=JSON&response_type=JSON&rest_data={ "session": "16hvppgjog0ot64j8qhd8sgec4", "module_name": "Opportunities", "query": "", "order_by": "", "offset": "", "select_fields": ["last_export_time_c","amount_usdollar","probability","classifications_c","assigned_user_id","service_modifier_notes_c","new_tcv_c","z_floor_c","type_ii_mrc_c","old_term_c","old_contract_end_date_c","existing_acct_num_c","type_ii_comments_c","legacy_circuit_info_c","cancel_date_c","date_modified","z_suite_c","old_nrc_c","team_set_id","oms_asr_num_c","a_building_type_c","service_modifiers_c","service_id_c","rcn_metro_circuit_id_c","description","new_nrc_c","currency_name","amount","actual_close_date_c","assigned_user_name","z_building_type_c","unqualified_flag_c","z_handoff_c","project_id_c","renewal_date_c","oms_status_c","related_circuit_info_c","team_name","next_step","customer_req_install_date_c","approval_action_c","account_name","vertical_c","a_floor_c","product_type_c","feasibility_number_c","sales_stage","related_circuit_c","synergy_sale_c","z_address_c","modified_by_name","a_handoff_c","account_id","type_ii_key_c","name","date_entered","team_count","new_contract_start_date_c","a_address_c","created_by_name","macd_c","association_note_c","include_in_forecast_c","new_term_c","campaign_name","cdb_opp_id_c","deleted","customer_signed_date_c","service_type_c","territory_c","old_mrc_c","cancel_notes_reason_c","sra1_master_accounts_opportunities_name","currency_id","cdb_updated_at_c","old_tcv_c","first_sale_on_account_c","modified_user_id","created_by","existing_customer_c","a_suite_c","bill_date_c","opportunity_type","new_mrc_c","delta_mrc_c","pricingtool_c","status_code_c","team_id","date_closed","products_opportunities_name","pricing_c","last_import_time_c","purchase_order_num_c","lead_source","type_ii_nrc_c","actual_install_date_c","synced_c","notify_email_c","expedite_amount_c","legacy_circuit_id_c","currency_symbol","id","campaign_id"], "link_name_to_fields_array": [], "max_results": "1", "deleted": 0 }

Failed to process JSON: false NoMethodError: undefined method []' for false:FalseClass from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/connection/response.rb:39:into_obj' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/connection/response.rb:9:in handle' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/connection/api/get_entry_list.rb:29:inget_entry_list' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:156:in find_by_sql' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:151:infind_every' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:99:in find_initial' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:42:infind' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:53:in `first' from (irb):4

frugardc commented 13 years ago

irb(main):001:0> SugarCRM.connection.debug = true => true irb(main):002:0> SugarOpportunity.first get_module_fields: Request: method=get_module_fields&input_type=JSON&response_type=JSON&rest_data={ "session": "dtgfmu03htp49ing71ct76p914", "module_name": "Opportunities" }

get_module_fields: JSON Response: {"module_fields"=> {"classifications_c"=> {"required"=>0, "label"=>"Classifications", "name"=>"classifications_c", "default_value"=>"", "type"=>"multienum", "options"=> {"type2"=>{"name"=>"type2", "value"=>"Type 2"}, "icb"=>{"name"=>"icb", "value"=>"ICB"}}}, "last_export_time_c"=> {"required"=>0, "label"=>"Last Export Time", "name"=>"last_export_time_c", "default_value"=>"", "type"=>"datetimecombo", "options"=>[]}, "z_floor_c"=> {"required"=>0, "label"=>"Z Floor", "name"=>"z_floor_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "amount_usdollar"=> {"required"=>0, "label"=>"Amount:", "name"=>"amount_usdollar", "type"=>"currency", "options"=>[]}, "probability"=> {"required"=>0, "label"=>"Probability (%):", "name"=>"probability", "type"=>"int", "options"=>[]}, "assigned_user_id"=> {"required"=>0, "label"=>"Assigned User:", "name"=>"assigned_user_id", "type"=>"relate", "options"=>[]}, "service_modifier_notes_c"=> {"required"=>0, "label"=>"Service Modifier Notes", "name"=>"service_modifier_notes_c", "default_value"=>"", "type"=>"text", "options"=>[]}, "new_tcv_c"=> {"required"=>0, "label"=>"New TCV", "name"=>"new_tcv_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "type_ii_mrc_c"=> {"required"=>0, "label"=>"Type II MRC($)", "name"=>"type_ii_mrc_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "old_term_c"=> {"required"=>0, "label"=>"Old Term", "name"=>"old_term_c", "default_value"=>"", "type"=>"enum", "options"=> {"3 Years"=>{"name"=>"3 Years", "value"=>"3 Years"}, ""=>{"name"=>"", "value"=>""}, "2 Years"=>{"name"=>"2 Years", "value"=>"2 Years"}, "1 Year"=>{"name"=>"1 Year", "value"=>"1 Year"}, "5 Years"=>{"name"=>"5 Years", "value"=>"5 Years"}}}, "old_contract_end_date_c"=> {"required"=>0, "label"=>"Old Contract End Date", "name"=>"old_contract_end_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "existing_acct_num_c"=> {"required"=>0, "label"=>"Existing Acct #", "name"=>"existing_acct_num_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "z_suite_c"=> {"required"=>0, "label"=>"Z Suite", "name"=>"z_suite_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "legacy_circuit_info_c"=> {"required"=>0, "label"=>"Legacy Info (e.g. CLR)", "name"=>"legacy_circuit_info_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "type_ii_comments_c"=> {"required"=>0, "label"=>"Type II Comments", "name"=>"type_ii_comments_c", "default_value"=>"", "type"=>"text", "options"=>[]}, "cancel_date_c"=> {"required"=>0, "label"=>"Cancel Date", "name"=>"cancel_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "date_modified"=> {"required"=>0, "label"=>"Date Modified", "name"=>"date_modified", "type"=>"datetime", "options"=>[]}, "old_nrc_c"=> {"required"=>0, "label"=>"Old NRC ($)", "name"=>"old_nrc_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "service_id_c"=> {"required"=>0, "label"=>"Service ID", "name"=>"service_id_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "a_building_type_c"=> {"required"=>0, "label"=>"A Building Type", "name"=>"a_building_type_c", "default_value"=>"", "type"=>"enum", "options"=> {"On Net With Fiber"=> {"name"=>"On Net With Fiber", "value"=>"On Net w/Fiber"}, ""=>{"name"=>"", "value"=>""}, "Off Net"=>{"name"=>"Off Net", "value"=>"Off Net"}, "LIT Suite"=>{"name"=>"LIT Suite", "value"=>"LIT Suite"}, "NA"=>{"name"=>"NA", "value"=>"NA"}}}, "team_set_id"=> {"required"=>0, "label"=>"Team Set ID", "name"=>"team_set_id", "type"=>"id", "options"=>[]}, "oms_asr_num_c"=> {"required"=>0, "label"=>"OMS ASR No", "name"=>"oms_asr_num_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "service_modifiers_c"=> {"required"=>0, "label"=>"Service Modifiers (hold ctrl to select multiple values)", "name"=>"service_modifiers_c", "default_value"=>"^^", "type"=>"multienum", "options"=> {"Extreme Mercury"=> {"name"=>"Extreme Mercury", "value"=>"Extreme (Mercury)"}, "Burstable Bandwidth"=> {"name"=>"Burstable Bandwidth", "value"=>"Burstable Bandwidth"}, ""=>{"name"=>"", "value"=>""}, "Managed Router"=>{"name"=>"Managed Router", "value"=>"Managed Router"}, "Extranet Services"=> {"name"=>"Extranet Services", "value"=>"Extranet Services"}, "Extremely Low Latency"=> {"name"=>"Extremely Low Latency", "value"=>"Extremely Low Latency"}, "Multicast"=>{"name"=>"Multicast", "value"=>"Multicast"}, "Standard Low Latency"=> {"name"=>"Standard Low Latency", "value"=>"Standard Low Latency"}}}, "rcn_metro_circuit_id_c"=> {"required"=>0, "label"=>"OMS Circuit ID", "name"=>"rcn_metro_circuit_id_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "description"=> {"required"=>0, "label"=>"Description:", "name"=>"description", "type"=>"text", "options"=>[]}, "new_nrc_c"=> {"required"=>0, "label"=>"New NRC ($)", "name"=>"new_nrc_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "currency_name"=> {"required"=>0, "label"=>"Currency Name", "name"=>"currency_name", "type"=>"relate", "options"=>[]}, "amount"=> {"required"=>1, "label"=>"Opportunity Amount:", "name"=>"amount", "type"=>"currency", "options"=>[]}, "actual_close_date_c"=> {"required"=>0, "label"=>"Actual Close Date", "name"=>"actual_close_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "z_building_type_c"=> {"required"=>0, "label"=>"Z Building Type", "name"=>"z_building_type_c", "default_value"=>"", "type"=>"enum", "options"=> {"On Net With Fiber"=> {"name"=>"On Net With Fiber", "value"=>"On Net w/Fiber"}, ""=>{"name"=>"", "value"=>""}, "Off Net"=>{"name"=>"Off Net", "value"=>"Off Net"}, "LIT Suite"=>{"name"=>"LIT Suite", "value"=>"LIT Suite"}, "NA"=>{"name"=>"NA", "value"=>"NA"}}}, "assigned_user_name"=> {"required"=>0, "label"=>"Assigned to:", "name"=>"assigned_user_name", "type"=>"relate", "options"=>[]}, "unqualified_flag_c"=> {"required"=>0, "label"=>"Unqualified Flag", "name"=>"unqualified_flag_c", "default_value"=>"0", "type"=>"bool", "options"=>[]}, "oms_status_c"=> {"required"=>0, "label"=>"OMS Status", "name"=>"oms_status_c", "default_value"=>"", "type"=>"enum", "options"=> {""=>{"name"=>"", "value"=>""}, "Pushed"=>{"name"=>"Pushed", "value"=>"Pushed"}, "Booked"=>{"name"=>"Booked", "value"=>"Booked"}}}, "project_id_c"=> {"required"=>0, "label"=>"Project ID", "name"=>"project_id_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "z_handoff_c"=> {"required"=>0, "label"=>"Z Handoff", "name"=>"z_handoff_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "renewal_date_c"=> {"required"=>0, "label"=>"Renewal Date", "name"=>"renewal_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "related_circuit_info_c"=> {"required"=>0, "label"=>"Related Info (TSP, etc)", "name"=>"related_circuit_info_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "team_name"=> {"required"=>0, "label"=>"Teams", "name"=>"team_name", "type"=>"relate", "options"=>[]}, "approval_action_c"=> {"required"=>0, "label"=>"Approval Action", "name"=>"approval_action_c", "default_value"=>"", "type"=>"enum", "options"=> {"Action 3"=>{"name"=>"Action 3", "value"=>"Action 3"}, ""=>{"name"=>"", "value"=>""}, "Action 1"=>{"name"=>"Action 1", "value"=>"Action 1"}, "Action 2"=>{"name"=>"Action 2", "value"=>"Action 2"}}}, "next_step"=> {"required"=>0, "label"=>"Next Step:", "name"=>"next_step", "type"=>"varchar", "options"=>[]}, "customer_req_install_date_c"=> {"required"=>0, "label"=>"Customer Requested Install Date", "name"=>"customer_req_install_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "product_type_c"=> {"required"=>1, "label"=>"Product Type", "name"=>"product_type_c", "default_value"=>"", "type"=>"enum", "options"=> {"Pt to Pt NNI Hub"=> {"name"=>"Pt to Pt NNI Hub", "value"=>"Pt to Pt NNI Hub"}, ""=>{"name"=>"", "value"=>""}, "Pt to Pt ENNI"=>{"name"=>"Pt to Pt ENNI", "value"=>"Pt to Pt ENNI"}, "Colocation"=>{"name"=>"Colocation", "value"=>"Colocation"}, "Switched Ethernet NNI Hub"=> {"name"=>"Switched Ethernet NNI Hub", "value"=>"Switched Ethernet NNI Hub"}, "Switched Ethernet ENNI"=> {"name"=>"Switched Ethernet ENNI", "value"=>"Switched Ethernet ENNI"}, "Switched Ethernet CoS Gold"=> {"name"=>"Switched Ethernet CoS Gold", "value"=>"Switched Ethernet CoS - Gold"}, "Pt to Pt Ethernet"=> {"name"=>"Pt to Pt Ethernet", "value"=>"Pt to Pt Ethernet"}, "Internet Access"=> {"name"=>"Internet Access", "value"=>"Internet Access"}, "Video"=>{"name"=>"Video", "value"=>"Video"}, "Switched Ethernet CoS Silver"=> {"name"=>"Switched Ethernet CoS Silver", "value"=>"Switched Ethernet CoS - Silver"}, "Switched Ethernet CoS Bronze"=> {"name"=>"Switched Ethernet CoS Bronze", "value"=>"Switched Ethernet CoS - Bronze"}, "Other"=>{"name"=>"Other", "value"=>"Other"}, "Voice"=>{"name"=>"Voice", "value"=>"Voice"}, "NA"=>{"name"=>"NA", "value"=>"NA"}, "Switched Ethernet"=> {"name"=>"Switched Ethernet", "value"=>"Switched Ethernet"}, "Private Line"=>{"name"=>"Private Line", "value"=>"Private Line"}}}, "feasibility_number_c"=> {"required"=>0, "label"=>"Feasibility Number", "name"=>"feasibility_number_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "z_address_c"=> {"required"=>1, "label"=>"Z Address", "name"=>"z_address_c", "default_value"=>"", "type"=>"text", "options"=>[]}, "a_floor_c"=> {"required"=>0, "label"=>"A Floor", "name"=>"a_floor_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "related_circuit_c"=> {"required"=>0, "label"=>"Related Circuit (ported, ckt, etc)", "name"=>"related_circuit_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "account_name"=> {"required"=>1, "label"=>"Account Name:", "name"=>"account_name", "type"=>"relate", "options"=>[]}, "vertical_c"=> {"required"=>0, "label"=>"Vertical", "name"=>"vertical_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "sales_stage"=> {"required"=>1, "label"=>"Opportunity Status", "name"=>"sales_stage", "type"=>"enum", "options"=> {""=>{"name"=>"", "value"=>""}, "L"=>{"name"=>"L", "value"=>"L - Lost"}, "W"=>{"name"=>"W", "value"=>"W - Win Order"}, "M"=>{"name"=>"M", "value"=>"M - Move"}, "SU"=>{"name"=>"SU", "value"=>"SU - Supp Prior to install"}, "CP"=>{"name"=>"CP", "value"=>"CP - Contract Pending"}, "C"=>{"name"=>"C", "value"=>"C - Change After install"}, "N"=>{"name"=>"N", "value"=>"N - Negotiation"}, "C2"=>{"name"=>"C2", "value"=>"C2 - Change with Renewal"}, "M2"=>{"name"=>"M2", "value"=>"M2 - Move with Renewal"}, "P"=>{"name"=>"P", "value"=>"P - Port"}, "E"=>{"name"=>"E", "value"=>"E - Evaluation"}, "UQ"=>{"name"=>"UQ", "value"=>"UQ - Unqualified"}, "Q"=>{"name"=>"Q", "value"=>"Q - Qualification"}, "R"=>{"name"=>"R", "value"=>"R - Renewal Signed"}, "CA"=>{"name"=>"CA", "value"=>"CAT - Cancel"}, "RP"=>{"name"=>"RP", "value"=>"RP - Renewal Pending"}, "FE"=>{"name"=>"FE", "value"=>"FE - Fully Executed Contract"}}}, "synergy_sale_c"=> {"required"=>0, "label"=>"Synergy Sale", "name"=>"synergy_sale_c", "default_value"=>"0", "type"=>"bool", "options"=>[]}, "type_ii_key_c"=> {"required"=>0, "label"=>"Type II Key", "name"=>"type_ii_key_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "a_handoff_c"=> {"required"=>0, "label"=>"A Handoff", "name"=>"a_handoff_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "modified_by_name"=> {"required"=>0, "label"=>"Modified by ID", "name"=>"modified_by_name", "type"=>"assigned_user_name", "options"=>[]}, "account_id"=> {"required"=>0, "label"=>"Account ID", "name"=>"account_id", "type"=>"id", "options"=>[]}, "name"=> {"required"=>1, "label"=>"Opportunity ID:", "name"=>"name", "default_value"=>"NEW OPP", "type"=>"name", "options"=>[]}, "date_entered"=> {"required"=>0, "label"=>"Date Created", "name"=>"date_entered", "type"=>"datetime", "options"=>[]}, "team_count"=> {"required"=>0, "label"=>"Teams", "name"=>"team_count", "type"=>"relate", "options"=>[]}, "association_note_c"=> {"required"=>0, "label"=>"Association Note", "name"=>"association_note_c", "default_value"=>"", "type"=>"text", "options"=>[]}, "a_address_c"=> {"required"=>1, "label"=>"A Address", "name"=>"a_address_c", "default_value"=>"", "type"=>"text", "options"=>[]}, "macd_c"=> {"required"=>0, "label"=>"MACD", "name"=>"macd_c", "default_value"=>"0", "type"=>"bool", "options"=>[]}, "new_contract_start_date_c"=> {"required"=>0, "label"=>"New Contract Start Date", "name"=>"new_contract_start_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "created_by_name"=> {"required"=>0, "label"=>"Created by ID", "name"=>"created_by_name", "type"=>"assigned_user_name", "options"=>[]}, "include_in_forecast_c"=> {"required"=>0, "label"=>"Include in Forecast", "name"=>"include_in_forecast_c", "default_value"=>"0", "type"=>"bool", "options"=>[]}, "cdb_opp_id_c"=> {"required"=>0, "label"=>"LBL_CDB_OPP_ID", "name"=>"cdb_opp_id_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "campaign_name"=> {"required"=>0, "label"=>"Campaign:", "name"=>"campaign_name", "type"=>"relate", "options"=>[]}, "new_term_c"=> {"required"=>0, "label"=>"New Term", "name"=>"new_term_c", "default_value"=>"", "type"=>"enum", "options"=> {"3 Years"=>{"name"=>"3 Years", "value"=>"3 Years"}, ""=>{"name"=>"", "value"=>""}, "2 Years"=>{"name"=>"2 Years", "value"=>"2 Years"}, "1 Year"=>{"name"=>"1 Year", "value"=>"1 Year"}, "5 Years"=>{"name"=>"5 Years", "value"=>"5 Years"}}}, "deleted"=> {"required"=>0, "label"=>"Deleted", "name"=>"deleted", "default_value"=>"0", "type"=>"bool", "options"=>[]}, "customer_signed_date_c"=> {"required"=>0, "label"=>"Customer Signed Date", "name"=>"customer_signed_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "service_type_c"=> {"required"=>1, "label"=>"Service Type", "name"=>"service_type_c", "default_value"=>"", "type"=>"enum", "options"=> {"AC POWER"=>{"name"=>"AC POWER", "value"=>"AC POWER"}, "Pt to Pt Ethernet 200 Mbs"=> {"name"=>"Pt to Pt Ethernet 200 Mbs", "value"=>"Pt to Pt Ethernet 200 Mbs"}, "Switched Ethernet 70 Mbs"=> {"name"=>"Switched Ethernet 70 Mbs", "value"=>"Switched Ethernet 70 Mbs"}, "Pt to Pt Ethernet 45 Mbs"=> {"name"=>"Pt to Pt Ethernet 45 Mbs", "value"=>"Pt to Pt Ethernet 45 Mbs"}, ""=>{"name"=>"", "value"=>""}, "Pt to Pt NNI Hub 1 Gbs"=> {"name"=>"Pt to Pt NNI Hub 1 Gbs", "value"=>"Pt-to-Pt NNI Hub - 1 Gb/s"}, "OC3C 2 Fiber"=>{"name"=>"OC3C 2 Fiber", "value"=>"OC3C 2 Fiber"}, "Pt to Pt Ethernet 6 Mbs"=> {"name"=>"Pt to Pt Ethernet 6 Mbs", "value"=>"Pt to Pt Ethernet 6 Mbs"}, "Switched Ethernet 700 Mbs"=> {"name"=>"Switched Ethernet 700 Mbs", "value"=>"Switched Ethernet 700 Mbs"}, "OC192 RING"=>{"name"=>"OC192 RING", "value"=>"OC192 RING"}, "PROFESSIONAL SERVICE"=> {"name"=>"PROFESSIONAL SERVICE", "value"=>"PROFESSIONAL SERVICE"}, "DS3 xcon COAX"=>{"name"=>"DS3 xcon COAX", "value"=>"DS3 xcon COAX"}, "Dist. Cabling ABAM 14 Pair 7 DS1s"=> {"name"=>"Dist. Cabling ABAM 14 Pair 7 DS1s", "value"=>"Dist. Cabling ABAM 14 Pair 7 DS1s"}, "Switched Ethernet 40 Mbs"=> {"name"=>"Switched Ethernet 40 Mbs", "value"=>"Switched Ethernet 40 Mbs"}, "Pt to Pt NNI Hub 10 Gbs"=> {"name"=>"Pt to Pt NNI Hub 10 Gbs", "value"=>"Pt-to-Pt NNI Hub - 10 Gb/s"}, "DC POWER"=>{"name"=>"DC POWER", "value"=>"DC POWER"}, "Internet Access 600 Mbs"=> {"name"=>"Internet Access 600 Mbs", "value"=>"Internet Access 600 Mbs"}, "Internet Access 500 Mbs"=> {"name"=>"Internet Access 500 Mbs", "value"=>"Internet Access 500 Mbs"}, "OC48 HUB"=>{"name"=>"OC48 HUB", "value"=>"OC48 HUB"}, "Internet Access 6 Mbs"=> {"name"=>"Internet Access 6 Mbs", "value"=>"Internet Access 6 Mbs"}, "DS3 MUX 12 Ports"=> {"name"=>"DS3 MUX 12 Ports", "value"=>"DS3 MUX 12 Ports"}, "OC48 Drop"=>{"name"=>"OC48 Drop", "value"=>"OC48 Drop"}, "OC12C 4 Fiber"=>{"name"=>"OC12C 4 Fiber", "value"=>"OC12C 4 Fiber"}, "Pt to Pt Ethernet 50 Mbs"=> {"name"=>"Pt to Pt Ethernet 50 Mbs", "value"=>"Pt to Pt Ethernet 50 Mbs"}, "Dark Fiber 10 Strands"=> {"name"=>"Dark Fiber 10 Strands", "value"=>"Dark Fiber 10 Strands"}, "Pt to Pt Ethernet 80 Mbs"=> {"name"=>"Pt to Pt Ethernet 80 Mbs", "value"=>"Pt to Pt Ethernet 80 Mbs"}, "STM4 2 Fiber"=>{"name"=>"STM4 2 Fiber", "value"=>"STM4 2 Fiber"}, "OC192 Hub"=>{"name"=>"OC192 Hub", "value"=>"OC192 Hub"}, "Pt to Pt Ethernet 900 Mbs"=> {"name"=>"Pt to Pt Ethernet 900 Mbs", "value"=>"Pt to Pt Ethernet 900 Mbs"}, "NA"=>{"name"=>"NA", "value"=>"NA"}, "Fiber xcon MM"=>{"name"=>"Fiber xcon MM", "value"=>"Fiber xcon MM"}, "CABINET"=>{"name"=>"CABINET", "value"=>"CABINET"}, "Internet Access 700 Mbs"=> {"name"=>"Internet Access 700 Mbs", "value"=>"Internet Access 700 Mbs"}, "Dark Fiber 4 Strands"=> {"name"=>"Dark Fiber 4 Strands", "value"=>"Dark Fiber 4 Strands"}, "Switched Ethernet 500 Mbs"=> {"name"=>"Switched Ethernet 500 Mbs", "value"=>"Switched Ethernet 500 Mbs"}, "Pt to Pt NNI Hub 300 Mbs"=> {"name"=>"Pt to Pt NNI Hub 300 Mbs", "value"=>"Pt-to-Pt NNI Hub - 300 Mb/s"}, "Pt to Pt NNI Hub 200 Mbs"=> {"name"=>"Pt to Pt NNI Hub 200 Mbs", "value"=>"Pt-to-Pt NNI Hub - 200 Mb/s"}, "Dist. Cabling COAX 6 Pair Cables"=> {"name"=>"Dist. Cabling COAX 6 Pair Cables", "value"=>"Dist. Cabling COAX 6 Pair Cables"}, "Pt to Pt Ethernet 1 Gbs"=> {"name"=>"Pt to Pt Ethernet 1 Gbs", "value"=>"Pt to Pt Ethernet 1 Gbs"}, "Switched Ethernet NA"=> {"name"=>"Switched Ethernet NA", "value"=>"Switched Ethernet NA"}, "Pt to Pt Ethernet 20 Mbs"=> {"name"=>"Pt to Pt Ethernet 20 Mbs", "value"=>"Pt to Pt Ethernet 20 Mbs"}, "Pt to Pt Ethernet 3 Mbs"=> {"name"=>"Pt to Pt Ethernet 3 Mbs", "value"=>"Pt to Pt Ethernet 3 Mbs"}, "Internet Access 90 Mbs"=> {"name"=>"Internet Access 90 Mbs", "value"=>"Internet Access 90 Mbs"}, "Switched Ethernet 1 Gbs"=> {"name"=>"Switched Ethernet 1 Gbs", "value"=>"Switched Ethernet 1 Gbs"}, "OC3 2 Fiber"=>{"name"=>"OC3 2 Fiber", "value"=>"OC3 2 Fiber"}, "Pt to Pt NNI Hub 400 Mbs"=> {"name"=>"Pt to Pt NNI Hub 400 Mbs", "value"=>"Pt-to-Pt NNI Hub - 400 Mb/s"}, "Fiber xcon SM"=>{"name"=>"Fiber xcon SM", "value"=>"Fiber xcon SM"}, "Internet Access 1000 Mbs"=> {"name"=>"Internet Access 1000 Mbs", "value"=>"Internet Access 1000 Mbs"}, "Internet Access 3 Mbs"=> {"name"=>"Internet Access 3 Mbs", "value"=>"Internet Access 3 Mbs"}, "Switched Ethernet 60 Mbs"=> {"name"=>"Switched Ethernet 60 Mbs", "value"=>"Switched Ethernet 60 Mbs"}, "Internet Access 30 Mbs"=> {"name"=>"Internet Access 30 Mbs", "value"=>"Internet Access 30 Mbs"}, "Switched Ethernet 90 Mbs"=> {"name"=>"Switched Ethernet 90 Mbs", "value"=>"Switched Ethernet 90 Mbs"}, "Managed Server"=>{"name"=>"Managed Server", "value"=>"Managed Server"}, "HOT HANDS"=>{"name"=>"HOT HANDS", "value"=>"HOT HANDS"}, "DS0"=>{"name"=>"DS0", "value"=>"DS0"}, "Dist. Cabling COAX 18 Pair Cables"=> {"name"=>"Dist. Cabling COAX 18 Pair Cables", "value"=>"Dist. Cabling COAX 18 Pair Cables"}, "2.5G WDM Protected"=> {"name"=>"2.5G WDM Protected", "value"=>"2.5G WDM Protected"}, "Switched Ethernet 30 Mbs"=> {"name"=>"Switched Ethernet 30 Mbs", "value"=>"Switched Ethernet 30 Mbs"}, "DS1"=>{"name"=>"DS1", "value"=>"DS1"}, "Pt to Pt Ethernet 800 Mbs"=> {"name"=>"Pt to Pt Ethernet 800 Mbs", "value"=>"Pt to Pt Ethernet 800 Mbs"}, "OTHER"=>{"name"=>"OTHER", "value"=>"OTHER"}, "Dist. Cabling COAX 12 Pair Cables"=> {"name"=>"Dist. Cabling COAX 12 Pair Cables", "value"=>"Dist. Cabling COAX 12 Pair Cables"}, "OC12 MUX"=>{"name"=>"OC12 MUX", "value"=>"OC12 MUX"}, "XCONN"=>{"name"=>"XCONN", "value"=>"XCONN"}, "Dist. Cabling ABAM 28 Pair 14 DS1s"=> {"name"=>"Dist. Cabling ABAM 28 Pair 14 DS1s", "value"=>"Dist. Cabling ABAM 28 Pair 14 DS1s"}, "10G WDM Unprotected"=> {"name"=>"10G WDM Unprotected", "value"=>"10G WDM Unprotected"}, "DS1 Drop"=>{"name"=>"DS1 Drop", "value"=>"DS1 Drop"}, "DS3"=>{"name"=>"DS3", "value"=>"DS3"}, "POTS Extension"=>{"name"=>"POTS Extension", "value"=>"POTS Extension"}, "Dist. Cabling FIBER 3 Pairs MM"=> {"name"=>"Dist. Cabling FIBER 3 Pairs MM", "value"=>"Dist. Cabling FIBER 3 Pairs MM"}, "Switched Ethernet Other"=> {"name"=>"Switched Ethernet Other", "value"=>"Switched Ethernet Other"}, "Pt to Pt Ethernet 100 Mbs"=> {"name"=>"Pt to Pt Ethernet 100 Mbs", "value"=>"Pt to Pt Ethernet 100 Mbs"}, "Internet Access 300 Mbs"=> {"name"=>"Internet Access 300 Mbs", "value"=>"Internet Access 300 Mbs"}, "Internet Access 60 Mbs"=> {"name"=>"Internet Access 60 Mbs", "value"=>"Internet Access 60 Mbs"}, "Pt to Pt Ethernet 950 Mbs"=> {"name"=>"Pt to Pt Ethernet 950 Mbs", "value"=>"Pt to Pt Ethernet 950 Mbs"}, "OC12C 2 Fiber"=>{"name"=>"OC12C 2 Fiber", "value"=>"OC12C 2 Fiber"}, "OC48 4 Fiber"=>{"name"=>"OC48 4 Fiber", "value"=>"OC48 4 Fiber"}, "40G WDM Unprotected"=> {"name"=>"40G WDM Unprotected", "value"=>"40G WDM Unprotected"}, "OC48C 4 Fiber"=>{"name"=>"OC48C 4 Fiber", "value"=>"OC48C 4 Fiber"}, "Pt to Pt NNI Hub 900 Mbs"=> {"name"=>"Pt to Pt NNI Hub 900 Mbs", "value"=>"Pt-to-Pt NNI Hub - 900 Mb/s"}, "Pt to Pt NNI Hub 800 Mbs"=> {"name"=>"Pt to Pt NNI Hub 800 Mbs", "value"=>"Pt-to-Pt NNI Hub - 800 Mb/s"}, "Internet Access 400 Mbs"=> {"name"=>"Internet Access 400 Mbs", "value"=>"Internet Access 400 Mbs"}, "Pt to Pt Ethernet 1.5 Mbs"=> {"name"=>"Pt to Pt Ethernet 1.5 Mbs", "value"=>"Pt to Pt Ethernet 1.5 Mbs"}, "Switched Ethernet 300 Mbs"=> {"name"=>"Switched Ethernet 300 Mbs", "value"=>"Switched Ethernet 300 Mbs"}, "Dist. Cabling FIBER 3 Pairs SM"=> {"name"=>"Dist. Cabling FIBER 3 Pairs SM", "value"=>"Dist. Cabling FIBER 3 Pairs SM"}, "Internet Access 45 Mbs"=> {"name"=>"Internet Access 45 Mbs", "value"=>"Internet Access 45 Mbs"}, "Internet Access 4.5 Mbs"=> {"name"=>"Internet Access 4.5 Mbs", "value"=>"Internet Access 4.5 Mbs"}, "Pt to Pt Ethernet 70 Mbs"=> {"name"=>"Pt to Pt Ethernet 70 Mbs", "value"=>"Pt to Pt Ethernet 70 Mbs"}, "Switched Ethernet 400 Mbs"=> {"name"=>"Switched Ethernet 400 Mbs", "value"=>"Switched Ethernet 400 Mbs"}, "Pt to Pt NNI Hub 100 Mbs"=> {"name"=>"Pt to Pt NNI Hub 100 Mbs", "value"=>"Pt-to-Pt NNI Hub - 100 Mb/s"}, "Interduct"=>{"name"=>"Interduct", "value"=>"Interduct"}, "Pt to Pt Ethernet 150 Mbs"=> {"name"=>"Pt to Pt Ethernet 150 Mbs", "value"=>"Pt to Pt Ethernet 150 Mbs"}, "OC48C 2 Fiber"=>{"name"=>"OC48C 2 Fiber", "value"=>"OC48C 2 Fiber"}, "Internet Access 200 Mbs"=> {"name"=>"Internet Access 200 Mbs", "value"=>"Internet Access 200 Mbs"}, "Pt to Pt Ethernet 500 Mbs"=> {"name"=>"Pt to Pt Ethernet 500 Mbs", "value"=>"Pt to Pt Ethernet 500 Mbs"}, "OC3 MUX 4 Ports"=> {"name"=>"OC3 MUX 4 Ports", "value"=>"OC3 MUX 4 Ports"}, "E1"=>{"name"=>"E1", "value"=>"E1"}, "Pt to Pt Ethernet 600 Mbs"=> {"name"=>"Pt to Pt Ethernet 600 Mbs", "value"=>"Pt to Pt Ethernet 600 Mbs"}, "Dist. Cabling CAT5 6 Cables"=> {"name"=>"Dist. Cabling CAT5 6 Cables", "value"=>"Dist. Cabling CAT5 6 Cables"}, "Internet Access 80 Mbs"=> {"name"=>"Internet Access 80 Mbs", "value"=>"Internet Access 80 Mbs"}, "1.25G WDM Protected"=> {"name"=>"1.25G WDM Protected", "value"=>"1.25G WDM Protected"}, "Pt to Pt Ethernet 850 Mbs"=> {"name"=>"Pt to Pt Ethernet 850 Mbs", "value"=>"Pt to Pt Ethernet 850 Mbs"}, "Pt to Pt Ethernet 10 Mbs"=> {"name"=>"Pt to Pt Ethernet 10 Mbs", "value"=>"Pt to Pt Ethernet 10 Mbs"}, "Internet Access 10 Gbs"=> {"name"=>"Internet Access 10 Gbs", "value"=>"Internet Access 10 Gbs"}, "Dark Fiber 1 Strand"=> {"name"=>"Dark Fiber 1 Strand", "value"=>"Dark Fiber 1 Strand"}, "10G WDM Protected"=> {"name"=>"10G WDM Protected", "value"=>"10G WDM Protected"}, "OC12 4 Fiber"=>{"name"=>"OC12 4 Fiber", "value"=>"OC12 4 Fiber"}, "Pt to Pt Ethernet 700 Mbs"=> {"name"=>"Pt to Pt Ethernet 700 Mbs", "value"=>"Pt to Pt Ethernet 700 Mbs"}, "Internet Access 900 Mbs"=> {"name"=>"Internet Access 900 Mbs", "value"=>"Internet Access 900 Mbs"}, "Internet Access 50 Mbs"=> {"name"=>"Internet Access 50 Mbs", "value"=>"Internet Access 50 Mbs"}, "Internet Access 20 Mbs"=> {"name"=>"Internet Access 20 Mbs", "value"=>"Internet Access 20 Mbs"}, "Switched Ethernet 200 Mbs"=> {"name"=>"Switched Ethernet 200 Mbs", "value"=>"Switched Ethernet 200 Mbs"}, "STS1"=>{"name"=>"STS1", "value"=>"STS1"}, "E3 HUB"=>{"name"=>"E3 HUB", "value"=>"E3 HUB"}, "CONSTRUCTION"=>{"name"=>"CONSTRUCTION", "value"=>"CONSTRUCTION"}, "Dist. Cabling COAX 24 Pair Cables"=> {"name"=>"Dist. Cabling COAX 24 Pair Cables", "value"=>"Dist. Cabling COAX 24 Pair Cables"}, "Switched Ethernet 20 Mbs"=> {"name"=>"Switched Ethernet 20 Mbs", "value"=>"Switched Ethernet 20 Mbs"}, "Switched Ethernet 900 Mbs"=> {"name"=>"Switched Ethernet 900 Mbs", "value"=>"Switched Ethernet 900 Mbs"}, "2.5G WDM Unprotected"=> {"name"=>"2.5G WDM Unprotected", "value"=>"2.5G WDM Unprotected"}, "Switched Ethernet 800 Mbs"=> {"name"=>"Switched Ethernet 800 Mbs", "value"=>"Switched Ethernet 800 Mbs"}, "Pt to Pt NNI Hub 600 Mbs"=> {"name"=>"Pt to Pt NNI Hub 600 Mbs", "value"=>"Pt-to-Pt NNI Hub - 600 Mb/s"}, "OC48 2 Fiber"=>{"name"=>"OC48 2 Fiber", "value"=>"OC48 2 Fiber"}, "Pt to Pt Ethernet 650 Mbs"=> {"name"=>"Pt to Pt Ethernet 650 Mbs", "value"=>"Pt to Pt Ethernet 650 Mbs"}, "OC3 Drop"=>{"name"=>"OC3 Drop", "value"=>"OC3 Drop"}, "STM1 4 Fiber"=>{"name"=>"STM1 4 Fiber", "value"=>"STM1 4 Fiber"}, "Cable Modem 5 Mbs"=> {"name"=>"Cable Modem 5 Mbs", "value"=>"Cable Modem 5 Mbs"}, "Internet Access 2 Mbs"=> {"name"=>"Internet Access 2 Mbs", "value"=>"Internet Access 2 Mbs"}, "Pt to Pt Ethernet 40 Mbs"=> {"name"=>"Pt to Pt Ethernet 40 Mbs", "value"=>"Pt to Pt Ethernet 40 Mbs"}, "Pt to Pt Ethernet 750 Mbs"=> {"name"=>"Pt to Pt Ethernet 750 Mbs", "value"=>"Pt to Pt Ethernet 750 Mbs"}, "Pt to Pt NNI Hub 700 Mbs"=> {"name"=>"Pt to Pt NNI Hub 700 Mbs", "value"=>"Pt-to-Pt NNI Hub - 700 Mb/s"}, "Internet Access 800 Mbs"=> {"name"=>"Internet Access 800 Mbs", "value"=>"Internet Access 800 Mbs"}, "Internet Access 70 Mbs"=> {"name"=>"Internet Access 70 Mbs", "value"=>"Internet Access 70 Mbs"}, "Switched Ethernet 80 Mbs"=> {"name"=>"Switched Ethernet 80 Mbs", "value"=>"Switched Ethernet 80 Mbs"}, "Switched Ethernet 100 Mbs"=> {"name"=>"Switched Ethernet 100 Mbs", "value"=>"Switched Ethernet 100 Mbs"}, "STM1 2 Fiber"=>{"name"=>"STM1 2 Fiber", "value"=>"STM1 2 Fiber"}, "STM4 4 Fiber"=>{"name"=>"STM4 4 Fiber", "value"=>"STM4 4 Fiber"}, "Internet Access 5 Mbs"=> {"name"=>"Internet Access 5 Mbs", "value"=>"Internet Access 5 Mbs"}, "Internet Access 40 Mbs"=> {"name"=>"Internet Access 40 Mbs", "value"=>"Internet Access 40 Mbs"}, "OC192 PT TO PT"=>{"name"=>"OC192 PT TO PT", "value"=>"OC192 PT TO PT"}, "OC12 Drop"=>{"name"=>"OC12 Drop", "value"=>"OC12 Drop"}, "Switched Ethernet 50 Mbs"=> {"name"=>"Switched Ethernet 50 Mbs", "value"=>"Switched Ethernet 50 Mbs"}, "Pt to Pt Ethernet 300 Mbs"=> {"name"=>"Pt to Pt Ethernet 300 Mbs", "value"=>"Pt to Pt Ethernet 300 Mbs"}, "Internet Access 10 Mbs"=> {"name"=>"Internet Access 10 Mbs", "value"=>"Internet Access 10 Mbs"}, "Pt to Pt NNI Hub 500 Mbs"=> {"name"=>"Pt to Pt NNI Hub 500 Mbs", "value"=>"Pt-to-Pt NNI Hub - 500 Mb/s"}, "DS1 MUX 28 Ports"=> {"name"=>"DS1 MUX 28 Ports", "value"=>"DS1 MUX 28 Ports"}, "OC48 RING"=>{"name"=>"OC48 RING", "value"=>"OC48 RING"}, "Dark Fiber 2 Strands"=> {"name"=>"Dark Fiber 2 Strands", "value"=>"Dark Fiber 2 Strands"}, "SPLICE"=>{"name"=>"SPLICE", "value"=>"SPLICE"}, "Ethernet xcon CAT 3"=> {"name"=>"Ethernet xcon CAT 3", "value"=>"Ethernet xcon CAT 3"}, "Internet Access 100 Mbs"=> {"name"=>"Internet Access 100 Mbs", "value"=>"Internet Access 100 Mbs"}, "OC12 2 Fiber"=>{"name"=>"OC12 2 Fiber", "value"=>"OC12 2 Fiber"}, "Pt to Pt Ethernet 60 Mbs"=> {"name"=>"Pt to Pt Ethernet 60 Mbs", "value"=>"Pt to Pt Ethernet 60 Mbs"}, "DS3 Drop"=>{"name"=>"DS3 Drop", "value"=>"DS3 Drop"}, "OC3 4 Fiber"=>{"name"=>"OC3 4 Fiber", "value"=>"OC3 4 Fiber"}, "STM16 2 Fiber"=>{"name"=>"STM16 2 Fiber", "value"=>"STM16 2 Fiber"}, "1.25G WDM Unprotected"=> {"name"=>"1.25G WDM Unprotected", "value"=>"1.25G WDM Unprotected"}, "Pt to Pt Ethernet 90 Mbs"=> {"name"=>"Pt to Pt Ethernet 90 Mbs", "value"=>"Pt to Pt Ethernet 90 Mbs"}, "Pt to Pt Ethernet 400 Mbs"=> {"name"=>"Pt to Pt Ethernet 400 Mbs", "value"=>"Pt to Pt Ethernet 400 Mbs"}, "Switched Ethernet 10 Mbs"=> {"name"=>"Switched Ethernet 10 Mbs", "value"=>"Switched Ethernet 10 Mbs"}, "DS1 xcon ABAM"=>{"name"=>"DS1 xcon ABAM", "value"=>"DS1 xcon ABAM"}, "DS3 HUB"=>{"name"=>"DS3 HUB", "value"=>"DS3 HUB"}, "OC3C 4 Fiber"=>{"name"=>"OC3C 4 Fiber", "value"=>"OC3C 4 Fiber"}, "Ethernet xcon CAT 5"=> {"name"=>"Ethernet xcon CAT 5", "value"=>"Ethernet xcon CAT 5"}, "Conduit"=>{"name"=>"Conduit", "value"=>"Conduit"}, "Internet Access 1.5 Mbs"=> {"name"=>"Internet Access 1.5 Mbs", "value"=>"Internet Access 1.5 Mbs"}, "OC3 HUB"=>{"name"=>"OC3 HUB", "value"=>"OC3 HUB"}, "Pt to Pt Ethernet 30 Mbs"=> {"name"=>"Pt to Pt Ethernet 30 Mbs", "value"=>"Pt to Pt Ethernet 30 Mbs"}, "STM16 4 Fiber"=>{"name"=>"STM16 4 Fiber", "value"=>"STM16 4 Fiber"}, "40G WDM Protected"=> {"name"=>"40G WDM Protected", "value"=>"40G WDM Protected"}, "TV1"=>{"name"=>"TV1", "value"=>"TV1"}, "OC12 HUB"=>{"name"=>"OC12 HUB", "value"=>"OC12 HUB"}, "Pt to Pt Ethernet 4.5 Mbs"=> {"name"=>"Pt to Pt Ethernet 4.5 Mbs", "value"=>"Pt to Pt Ethernet 4.5 Mbs"}, "Switched Ethernet 600 Mbs"=> {"name"=>"Switched Ethernet 600 Mbs", "value"=>"Switched Ethernet 600 Mbs"}}}, "territory_c"=> {"required"=>0, "label"=>"Territory", "name"=>"territory_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "old_mrc_c"=> {"required"=>0, "label"=>"Old MRC ($)", "name"=>"old_mrc_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "cancel_notes_reason_c"=> {"required"=>0, "label"=>"Cancel Notes / Reason", "name"=>"cancel_notes_reason_c", "default_value"=>"", "type"=>"text", "options"=>[]}, "sra1_master_accounts_opportunities_name"=> {"required"=>0, "label"=>"Master Accounts", "name"=>"sra1_master_accounts_opportunities_name", "type"=>"relate", "options"=>[]}, "currency_id"=> {"required"=>0, "label"=>"Currency:", "name"=>"currency_id", "type"=>"id", "options"=>[]}, "cdb_updated_at_c"=> {"required"=>0, "label"=>"LBL_CDB_UPDATED_AT", "name"=>"cdb_updated_at_c", "default_value"=>"", "type"=>"datetimecombo", "options"=>[]}, "old_tcv_c"=> {"required"=>0, "label"=>"Old TCV", "name"=>"old_tcv_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "first_sale_on_account_c"=> {"required"=>0, "label"=>"First Sale On Account", "name"=>"first_sale_on_account_c", "default_value"=>"0", "type"=>"bool", "options"=>[]}, "modified_user_id"=> {"required"=>0, "label"=>"Modified by ID", "name"=>"modified_user_id", "type"=>"assigned_user_name", "options"=>[]}, "created_by"=> {"required"=>0, "label"=>"Created by ID", "name"=>"created_by", "type"=>"assigned_user_name", "options"=>[]}, "existing_customer_c"=> {"required"=>0, "label"=>"Existing Customer", "name"=>"existing_customer_c", "default_value"=>"0", "type"=>"bool", "options"=>[]}, "a_suite_c"=> {"required"=>0, "label"=>"A Suite", "name"=>"a_suite_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "bill_date_c"=> {"required"=>0, "label"=>"Bill Date", "name"=>"bill_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "opportunity_type"=> {"required"=>0, "label"=>"Type:", "name"=>"opportunity_type", "type"=>"enum", "options"=> {"New Business"=>{"name"=>"New Business", "value"=>"New Business"}, ""=>{"name"=>"", "value"=>""}, "Existing Business"=> {"name"=>"Existing Business", "value"=>"Existing Business"}}}, "new_mrc_c"=> {"required"=>1, "label"=>"New MRC ($)", "name"=>"new_mrc_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "delta_mrc_c"=> {"required"=>0, "label"=>"Delta MRC", "name"=>"delta_mrc_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "pricingtool_c"=> {"required"=>0, "label"=>"Pricing Tool", "name"=>"pricingtool_c", "default_value"=>"http://10.128.2.145:3000/quote/private_line?embed=true", "type"=>"iframe", "options"=>[]}, "status_code_c"=> {"required"=>0, "label"=>"Status Code", "name"=>"status_code_c", "default_value"=>"", "type"=>"enum", "options"=> {"3 Inactivity Excessive On Hold time"=> {"name"=>"3 Inactivity Excessive On Hold time", "value"=>"3 - Inactivity/Excessive "}, "5 Incorrect Information on Order"=> {"name"=>"5 Incorrect Information on Order", "value"=>"5 - Incorrect Information on Order"}, "1 Customer no longer has requirement"=> {"name"=>"1 Customer no longer has requirement", "value"=>"1 - Customer no longer has requirement"}, "4 New address information"=> {"name"=>"4 New address information", "value"=>"4 - New address information"}, "3 Updated Commission Information"=> {"name"=>"3 Updated Commission Information", "value"=>"3 - Updated Commission Information"}, "2 Updated Term"=> {"name"=>"2 Updated Term", "value"=>"2 - Updated Term"}, ""=>{"name"=>"", "value"=>""}, "1 Other"=>{"name"=>"1 Other", "value"=>"1 - Other"}, "1 Updated MRC and or NRC"=> {"name"=>"1 Updated MRC and or NRC", "value"=>"1 - Updated MRC and/or NRC"}, "2 Lack of customer interest response"=> {"name"=>"2 Lack of customer interest response", "value"=>"2 - Lack of customer interest/response"}, "3 Ethernet Upgrade or Downgrade"=> {"name"=>"3 Ethernet Upgrade or Downgrade", "value"=>"3 - Ethernet Upgrade or Downgrade"}, "1 Pricing"=>{"name"=>"1 Pricing", "value"=>"1 - Pricing"}, "2 New service type required"=> {"name"=>"2 New service type required", "value"=>"2 - New service type required"}, "2 Non Commission Affecting"=> {"name"=>"2 Non Commission Affecting", "value"=>"2 - Non-Commission Affecting"}, "4 Type II delays issues"=> {"name"=>"4 Type II delays issues", "value"=>"4 - Type II delays/issues"}, "2 Stale opportunity Archived"=> {"name"=>"2 Stale opportunity Archived", "value"=>"2 - Stale opportunity Archived"}, "1 New process required"=> {"name"=>"1 New process required", "value"=>"1 - New process required"}, "3 Other"=>{"name"=>"3 Other", "value"=>"3 - Other"}, "6 Other"=>{"name"=>"6 Other", "value"=>"6 - Other"}, "4 Non Commission Affecting revision"=> {"name"=>"4 Non Commission Affecting revision", "value"=>"4 - Non-Commission Affecting revision"}, "5 Other"=>{"name"=>"5 Other", "value"=>"5 - Other"}, "1 Commission Affecting"=> {"name"=>"1 Commission Affecting", "value"=>"1 - Commission Affecting"}, "3 Network limitations"=> {"name"=>"3 Network limitations", "value"=>"3 - Network limitations"}, "4 Timeframe"=>{"name"=>"4 Timeframe", "value"=>"4 - Timeframe"}, "2 Sidera can not meet requested installation"=> {"name"=>"2 Sidera can not meet requested installation", "value"=>"2 - Sidera can not meet requested installation"}}}, "team_id"=> {"required"=>0, "label"=>"Team ID", "name"=>"team_id", "type"=>"team_list", "options"=>[]}, "date_closed"=> {"required"=>1, "label"=>"Forecasted Close Date:", "name"=>"date_closed", "type"=>"date", "options"=>[]}, "products_opportunities_name"=> {"required"=>0, "label"=>"Products and Services", "name"=>"products_opportunities_name", "type"=>"relate", "options"=>[]}, "pricing_c"=> {"required"=>0, "label"=>"Pricing", "name"=>"pricing_c", "default_value"=> "http://cdb-web1:23/cdb/updateOpportunity.do?opportunityKey=121160", "type"=>"iframe", "options"=>[]}, "last_import_time_c"=> {"required"=>0, "label"=>"Last Import Time", "name"=>"last_import_time_c", "default_value"=>"", "type"=>"datetimecombo", "options"=>[]}, "purchase_order_num_c"=> {"required"=>0, "label"=>"Purchase Order No", "name"=>"purchase_order_num_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "lead_source"=> {"required"=>0, "label"=>"Lead Source:", "name"=>"lead_source", "type"=>"enum", "options"=> {"Word of mouth"=>{"name"=>"Word of mouth", "value"=>"Word of mouth"}, ""=>{"name"=>"", "value"=>""}, "Partner"=>{"name"=>"Partner", "value"=>"Partner"}, "Existing Customer"=> {"name"=>"Existing Customer", "value"=>"Existing Customer"}, "Public Relations"=> {"name"=>"Public Relations", "value"=>"Public Relations"}, "Trade Show"=>{"name"=>"Trade Show", "value"=>"Trade Show"}, "Self Generated"=>{"name"=>"Self Generated", "value"=>"Self Generated"}, "Other"=>{"name"=>"Other", "value"=>"Other"}, "Direct Mail"=>{"name"=>"Direct Mail", "value"=>"Direct Mail"}, "Employee"=>{"name"=>"Employee", "value"=>"Employee"}, "Email"=>{"name"=>"Email", "value"=>"Email"}, "Web Site"=>{"name"=>"Web Site", "value"=>"Web Site"}, "Cold Call"=>{"name"=>"Cold Call", "value"=>"Cold Call"}, "Campaign"=>{"name"=>"Campaign", "value"=>"Campaign"}, "Conference"=>{"name"=>"Conference", "value"=>"Conference"}}}, "type_ii_nrc_c"=> {"required"=>0, "label"=>"Type II NRC ($)", "name"=>"type_ii_nrc_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "actual_install_date_c"=> {"required"=>0, "label"=>"Actual Install Date", "name"=>"actual_install_date_c", "default_value"=>"", "type"=>"date", "options"=>[]}, "synced_c"=> {"required"=>0, "label"=>"LBL_SYNCED", "name"=>"synced_c", "default_value"=>"false", "type"=>"varchar", "options"=>[]}, "notify_email_c"=> {"required"=>0, "label"=>"Notify Email", "name"=>"notify_email_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "expedite_amount_c"=> {"required"=>0, "label"=>"Expedite Amount", "name"=>"expedite_amount_c", "default_value"=>"", "type"=>"currency", "options"=>[]}, "legacy_circuit_id_c"=> {"required"=>0, "label"=>"Legacy Circuit ID", "name"=>"legacy_circuit_id_c", "default_value"=>"", "type"=>"varchar", "options"=>[]}, "currency_symbol"=> {"required"=>0, "label"=>"Currency Symbol", "name"=>"currency_symbol", "type"=>"relate", "options"=>[]}, "id"=> {"required"=>1, "label"=>"ID", "name"=>"id", "type"=>"id", "options"=>[]}, "campaign_id"=> {"required"=>0, "label"=>"campaign_id", "name"=>"campaign_id", "type"=>"id", "options"=>[]}}, "module_name"=>"Opportunities", "link_fields"=> {"opportunities_documents"=> {"name"=>"opportunities_documents", "module"=>"", "bean_name"=>"", "relationship"=>"opportunities_documents", "type"=>"link"}, "leads"=> {"name"=>"leads", "module"=>"", "bean_name"=>"", "relationship"=>"opportunity_leads", "type"=>"link"}, "quotes"=> {"name"=>"quotes", "module"=>"", "bean_name"=>"", "relationship"=>"quotes_opportunities", "type"=>"link"}, "products_opportunities"=> {"name"=>"products_opportunities", "module"=>"", "bean_name"=>"", "relationship"=>"products_opportunities", "type"=>"link"}, "campaign_link"=> {"name"=>"campaign_link", "module"=>"Campaigns", "bean_name"=>"Campaign", "relationship"=>"opportunities_campaign", "type"=>"link"}, "teams"=> {"name"=>"teams", "module"=>"", "bean_name"=>"", "relationship"=>"opportunities_teams", "type"=>"link"}, "contracts"=> {"name"=>"contracts", "module"=>"", "bean_name"=>"", "relationship"=>"contracts_opportunities", "type"=>"link"}, "notes"=> {"name"=>"notes", "module"=>"", "bean_name"=>"", "relationship"=>"opportunity_notes", "type"=>"link"}, "team_count_link"=> {"name"=>"team_count_link", "module"=>"Teams", "bean_name"=>"TeamSet", "relationship"=>"opportunities_team_count_relationship", "type"=>"link"}, "currencies"=> {"name"=>"currencies", "module"=>"", "bean_name"=>"", "relationship"=>"opportunity_currencies", "type"=>"link"}, "meetings"=> {"name"=>"meetings", "module"=>"", "bean_name"=>"", "relationship"=>"opportunity_meetings", "type"=>"link"}, "campaign_opportunities"=> {"name"=>"campaign_opportunities", "module"=>"", "bean_name"=>"", "relationship"=>"campaign_opportunities", "type"=>"link"}, "modified_user_link"=> {"name"=>"modified_user_link", "module"=>"Users", "bean_name"=>"User", "relationship"=>"opportunities_modified_user", "type"=>"link"}, "created_by_link"=> {"name"=>"created_by_link", "module"=>"Users", "bean_name"=>"User", "relationship"=>"opportunities_created_by", "type"=>"link"}, "sra1_map_request_opportunities"=> {"name"=>"sra1_map_request_opportunities", "module"=>"", "bean_name"=>"", "relationship"=>"sra1_map_request_opportunities", "type"=>"link"}, "campaigns"=> {"name"=>"campaigns", "module"=>"CampaignLog", "bean_name"=>"CampaignLog", "relationship"=>"opportunities_campaign", "type"=>"link"}, "project"=> {"name"=>"project", "module"=>"", "bean_name"=>"", "relationship"=>"projects_opportunities", "type"=>"link"}, "tasks"=> {"name"=>"tasks", "module"=>"", "bean_name"=>"", "relationship"=>"opportunity_tasks", "type"=>"link"}, "accounts"=> {"name"=>"accounts", "module"=>"Accounts", "bean_name"=>"Account", "relationship"=>"accounts_opportunities", "type"=>"link"}, "sra1_master_accounts_opportunities"=> {"name"=>"sra1_master_accounts_opportunities", "module"=>"", "bean_name"=>"", "relationship"=>"sra1_master_accounts_opportunities", "type"=>"link"}, "products_o49a1roducts_ida"=> {"name"=>"products_o49a1roducts_ida", "module"=>"", "bean_name"=>"", "relationship"=>"products_opportunities", "type"=>"link"}, "opportunities_sc1_contact_types"=> {"name"=>"opportunities_sc1_contact_types", "module"=>"", "bean_name"=>"", "relationship"=>"opportunities_sc1_contact_types", "type"=>"link"}, "emails"=> {"name"=>"emails", "module"=>"", "bean_name"=>"", "relationship"=>"emails_opportunities_rel", "type"=>"link"}, "contacts"=> {"name"=>"contacts", "module"=>"Contacts", "bean_name"=>"Contact", "relationship"=>"opportunities_contacts", "type"=>"link"}, "team_link"=> {"name"=>"team_link", "module"=>"Teams", "bean_name"=>"Team", "relationship"=>"opportunities_team", "type"=>"link"}, "assigned_user_link"=> {"name"=>"assigned_user_link", "module"=>"Users", "bean_name"=>"User", "relationship"=>"opportunities_assigned_user", "type"=>"link"}, "sra1_maste2ca6ccounts_ida"=> {"name"=>"sra1_maste2ca6ccounts_ida", "module"=>"", "bean_name"=>"", "relationship"=>"sra1_master_accounts_opportunities", "type"=>"link"}, "calls"=> {"name"=>"calls", "module"=>"", "bean_name"=>"", "relationship"=>"opportunity_calls", "type"=>"link"}}}

get_entry_list: Request: method=get_entry_list&input_type=JSON&response_type=JSON&rest_data={ "session": "b5fcv5d9fnuiqfkhp759mo5374", "module_name": "Opportunities", "query": "", "order_by": "id", "offset": "", "select_fields": ["last_export_time_c","amount_usdollar","probability","classifications_c","assigned_user_id","service_modifier_notes_c","new_tcv_c","z_floor_c","type_ii_mrc_c","old_term_c","old_contract_end_date_c","existing_acct_num_c","type_ii_comments_c","legacy_circuit_info_c","cancel_date_c","date_modified","z_suite_c","old_nrc_c","team_set_id","oms_asr_num_c","a_building_type_c","service_modifiers_c","service_id_c","rcn_metro_circuit_id_c","description","new_nrc_c","currency_name","amount","actual_close_date_c","assigned_user_name","z_building_type_c","unqualified_flag_c","z_handoff_c","project_id_c","renewal_date_c","oms_status_c","related_circuit_info_c","team_name","next_step","customer_req_install_date_c","approval_action_c","account_name","vertical_c","a_floor_c","product_type_c","feasibility_number_c","sales_stage","related_circuit_c","synergy_sale_c","z_address_c","modified_by_name","a_handoff_c","account_id","type_ii_key_c","name","date_entered","team_count","new_contract_start_date_c","a_address_c","created_by_name","macd_c","association_note_c","include_in_forecast_c","new_term_c","campaign_name","cdb_opp_id_c","deleted","customer_signed_date_c","service_type_c","territory_c","old_mrc_c","cancel_notes_reason_c","sra1_master_accounts_opportunities_name","currency_id","cdb_updated_at_c","old_tcv_c","first_sale_on_account_c","modified_user_id","created_by","existing_customer_c","a_suite_c","bill_date_c","opportunity_type","new_mrc_c","delta_mrc_c","pricingtool_c","status_code_c","team_id","date_closed","products_opportunities_name","pricing_c","last_import_time_c","purchase_order_num_c","lead_source","type_ii_nrc_c","actual_install_date_c","synced_c","notify_email_c","expedite_amount_c","legacy_circuit_id_c","currency_symbol","id","campaign_id"], "link_name_to_fields_array": [], "max_results": "0", "deleted": 0 }

Failed to process JSON: false NoMethodError: undefined method []' for false:FalseClass from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/connection/response.rb:39:into_obj' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/connection/response.rb:9:in handle' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/connection/api/get_entry_list.rb:29:inget_entry_list' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:175:in find_by_sql' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:99:infind_initial' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:42:in find' from /usr/lib/ruby/gems/1.8/gems/sugarcrm-0.9.8/lib/sugarcrm/base.rb:53:infirst' from (irb):2

chicks commented 13 years ago

This is a bug on the current version - looking into it.

frugardc commented 13 years ago

Also of note I suppose. This worked a few days ago, so some change in the data or structure has fouled it up I think.

frugardc commented 13 years ago

With the latest version, I seem to get nil, rather than false. Again, assuredly with records in the Opportunity table.

irb(main):001:0> SugarCRM::Opportunity.first

=> nil

davidsulc commented 13 years ago

Yes, returning nil instead of false was changed recently for more consistency.

There being no result returned for Opportunity.first is not normal, though. (It works correctly for me.)

Would you by any chance be able to narrow down the opportunity data this causing trouble?

frugardc commented 13 years ago

You think it is a matter of a field, relationship, or a piece of data in a record? We have been making changes to fields and relationships quite a lot, so it really could be any of them. Just wondering if you had any idea where I should start looking first.

davidsulc commented 13 years ago

I'd venture it's in the data, based on the info above.

Just to be sure, check opportunity.attributes and opportunity.link_fields and see if they seem correct to you.

Are you able to query specific opportunities (e.g. by specifying an id or a name)?

What happens if you call SugarCRM::Opportunity.find(:order_by => :id, :limit => 1) ?

frugardc commented 13 years ago

Not able to query any individual Opportunities. I am having a problem in the application with a related module that I called ContactTypes. We are using SugarEnterprise, on Oracle, and the application tries to truncate table names to less than thirty characters to deal with limitations of oracle table and column names. It seems that sugar accounts for this in some places, but not in other places where it creates very long aliases in it's queries. This bug messes with the display of the related module in the application. It does not however mess with the simple display and search of an opportunity, so for that reason, I didn't think it was related. Attempting to query that ContactType module though, I see the same type of results, so I am now thinking that it is somehow related. I'll try removing that module, and update the issue here.

Thanks again!

frugardc commented 13 years ago

This is a function of broken relationships in my specific environment. Closing.

chicks commented 13 years ago

Well, I'm glad it's not a bug with our gem - but if you are an enterprise customer feel free to open a support case with Sugar!