• Doug Chasman
  • NEWBIE
  • 85 Points
  • Member since 2005
  • Distinguished Engineer, R&D
  • Salesforce

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 59
    Replies
activesalesforce-1.1.4.gem contains:

- supports the latest version of rails and rubygems
- select count(*) now uses 9.0 api support for native SOQL select count()
- clientId support
- SID authentication connection management bug fixes

NOTE: In your environment.rb you will need to change:

require_gem 'activesalesforce'


to:

require 'activesalesforce'

Message Edited by Doug Chasman on 03-28-2007 01:43 PM

activesalesforce-1.1.4.gem contains:

- supports the latest version of rails and rubygems
- select count(*) now uses 9.0 api support for native SOQL select count()
- clientId support
- SID authentication connection management bug fixes

NOTE: In your environment.rb you will need to change:

require_gem 'activesalesforce'


to:

require 'activesalesforce'

Message Edited by Doug Chasman on 03-28-2007 01:43 PM

Hi ,

In my lightning app, I use History.pushState , history.replaceState, etc ...

It was very convenient, but since the locker service activate, window.history is no longer accessible.

Is there some way to access it ?
If not, how/when can I manage SalesForce to provide a workaround for this regression due to Locker Service ?

Thanks & best regards
I've started dabling in Lightning Components and worked through a tutorial last year and have done one of the trailheads a few days.  So I know how to code basic Lightning components and apps.  And I see in the metadata that these become AuraDefinitionBundles.  I also so an example of some code where a bit of JS is added to an empty VF page and that always a Lightning Component to be spun up inside a VF page.

What I want to do is take an exist VF page that is exposed to the internet as a SF "Sites" application and port it to Lightning.  What I included in the prior paragaph leads me to believe the page is codable.  Here's what I don't know.  When a Sites application is configured, you have to tell it what it has access to-- VF pages, Apex controllers, objects and fields, etc.  I don't know how you would give it access to the Aura bundle.  (Unless it's totally implicit and you don't have to and it automatically gets acces.)

Can anyone address the question of how to configure and deploy Sites application that includes a VF page that spins up an Lightning Component?
 
Has anyone else out there run into this issue?  Prior to the Summer 15 release,  the ui:outputRichText component had an attribute called value that took your rich text to be displayed as a string.  This has been removed and replaced with a body attribute that accepts an array of Component - a type that you cannot declare in your lightning components.
I would like to define
  Code:
class MyContact < ActiveRecord::Base
include ActiveSalesforce::ActiveRecord::Mixin
set_table_name("Contact")
end

 but to do this, I need to be connected to salesforce.com *before* including the set_table_name (or set_table_name connects automatically).

What I need is to be able to set up my classes, and *then* to initiate connection(s). Especially in a test rig where connecting to salesforce.com is part of the tested methods, in which I would like to use pre-recorded test results for offline testing, just as Asf is unit-tested.

Would it be possible to postpone connection in set_table_name to later ?


  • March 26, 2007
  • Like
  • 0
I have a custom object defined with a namespace/custom prefix : the resulting classname is something like ALT__Myklass__c

I wish to define Myklass in ActiveSFDC :
Code:
class Myklass < ActiveRecord::Base
    include ActiveSalesforce::ActiveRecord::Mixin
    set_table_name("ALT__Myklass__c")
end
This does not work : ActiveSFDC looks for ALT_Myklass (notice only 1 underscore), or defaults back to ALT_Myklass__c (still only 1 underscore). This does not work either if we do not set_table_name : AsctiveSFDC goes llooking for Myklass__c, with no prefix.


ActiveSFDC needs to handle namespace prefixes correctly, just as it handles custom '__c' suffixes.
  • March 19, 2007
  • Like
  • 0
Can you pass in parameters such as the Opportunity ID to an SControl? 
 
Hi all,

What am I doing wrong?

My database connector is configured with the following:

adapter: activesalesforce
url: https://www.salesforce.com/services/Soap/u/8.0
username: myusername
password: mypassword

My environment.rb config is

Rails::Initializer.run do |config|
require_gem 'activesalesforce'
end

It physically works, but its unusably slow. Thanks for any advice.

william
Ruby 1.8.5-p12
Rails 1.2.2
ActiveSalesforce 1.1.0

# environment.rb
Rails::Initializer.run do |config|   
    # Add Salesforce support into ActiveRecord
    require_gem 'activesalesforce' 
end

# database.yaml
adapter: activesalesforce
url: https://test.salesforce.com
username: <username>
password: <password>


Then I got these errors:

Code:
=> Booting WEBrick...
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant ActiveRecord::ConnectionAdapters::Column (NameError)
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:452:in `const_missing'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesalesforce-1.1.0/lib/column_definition.rb:32
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:342:in `new_constants_in'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/dependencies.rb:495:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesalesforce-1.1.0/lib/asf_adapter.rb:25
         ... 30 levels...
        from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/commands/server.rb:39
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from server:3


 

hi, everybody

I added a formula field to an object with this content:

HYPERLINK("https://na3-api.salesforce.com/secur/frontdoor.jsp?sid=" & GETSESSIONID() & "&retURL=/servlet/servlet.Integration?lid=01r500000009WP3⁣=1&param=a_parameter", "open")

This place a link that open a web-tab in my apeexchange app with a s-control.
My cuestion is:
how can I get the value of the parameter "param" (a_parameter) in the s-control placed in the web-tab?

thanks in advance
  • February 06, 2007
  • Like
  • 0
I am creating a Rails app that is called from a custom link in sfdc using SID authentication. The first time the link is clicked it works, each time after it fails giving the following error (abbreviated).
 
ActiveRecord::StatementInvalid
(ActiveRecord::StatementInvalid:
ActiveRecord::ConnectionNotEstablished:
ActiveRecord::ConnectionNotEstablished: Retrieving metadata for ...)
 
If I change over to a hard coded login, using an entry in the database.yml file, it works every time. The error can be easily recreated with this simple rails app.
 
From a command line execute the following:
  1. rails sid_test
  2. cd sid_test
  3. Add require_gem 'activesalesforce' to the environment.rb file
  4. ruby script/generate model Account
  5. ruby script/generate controller Test sid_test
  6. Add this code to the sid_test method of the Test controller (uses SID authentication):
      Account.establish_connection(:adapter => 'activesalesforce',
                                   :sid => params[:sid],
                                   :url => params[:api_server_url])
      account = Account.find(:first)
      render :text => "Name = #{account.name}"
  7. ruby script/server
  8. Create a custom link in sfdc like this one:
    https://mysite.com/test/sid_test?sid={!API.Session_ID}&api_server_url={!API.Enterprise_Server_URL_80}
  9. Click it once, it works, try it again, (boom)!

My assumption is that I must call establish_connection each time I need to connect to sfdc to ensure I am connecting using the proper user's session.

Any one else having these or similar issues with SID authentication?

I am using the latest versions of Rails (1.2.1), ActiveRecord (1.15.1) and ActiveSalesforce (1.1.0).  I can provide more details if it will help.

Thanks,
John

{!SUBSTITUTE("This is a test","a","/") }
evaluates to "This is / test", as expected.
 
But {!SUBSTITUTE("{!Opportunity.Name}","a","/") }
evaluates *literally* to "{!Opportunity.N/me}", instead of embedding slashes in the actual Opportunity Name.
 
Am I doing something wrong or is this broken. I can't find any documentation that addresses this.
 
Nick
 
  • January 31, 2007
  • Like
  • 0
Using Activesalesforce and a Rails application, is there a way to specify that Activesalesforce use the Session ID and Server URL handed through from a custom link or S-Control?
 
I am looking for a seamless authentication transition from salesforce to my custom app as described in:
 
 
The only documentation I have found on establishing an ASF connection is to hard code the username and password in the database.yaml file of a Rails app.
 
Thanks in advance,
John