just out of curiosity.
Subject: Who is using salesforce.com?
The company I’m working for is begining use of Salesforce.com. Does anyone have any experience making it interact with Domino?
Subject: RE: Who is using salesforce.com?
Really? Can you give me some help on how to communicate between salesforce.com and domino? I “think” I need to write a java agent to access data in salesforce.com, and store the information into a Notes database. I am not a java developer, so anything would be great help for me. Thanks.
Subject: RE: Who is using salesforce.com?
by far the easiest way to manipulate salesforce data is using the OfficeToolkit. You could use that from a lotus script agent for example.
http://www.salesforce.com/developer/projects_toolkits.jsp#Microsoft_sect
Subject: RE: Who is using salesforce.com?
Use the OfficeToolkit? But does that mean I can access it on a local computer? I need something that I can access it as URL though (webAgent or webQueryOpen agent) Any suggestions?
Subject: RE: Who is using salesforce.com?
I’m using the Office Toolkit from LotusScript agents to pull and push data to Salesforce.com. I have the Toolkit installed on a Windows (Domino) server so scheduled agents can clean-up data in Salesforce. It works quite well.
I don’t use the Office Toolkit from WebQueryOpen or WebQuerySave agents, but I don’t see why you would have any problem in doing that.
My agents are written in LotusScript to take advantage of the COM interface of the Office Toolkit. I would prefer to use a Java agent, except that the current SFDC API requires Java 1.5 with the Axis packages. I’m using Notes/Domino 7 and the JVM is 1.4.2, so I don’t believe it’s possible to use a Domino Java agent.
I have a problem that perhaps some of you could help with: I can’t update an array of objects with a LotusScript agent, and that’s making my agents quite slow. I presume the problem is that LotusScript can’t handle the array of objects, so it crashes.
For example, say I do a QUERY to pull down 10 accounts. I can then loop through each of those accounts and set a value to a field (record.Item(“BillingCity”).value=“XYZ”). I can call the UPDATE methed for each record immediately, which works fine.
What I would prefer to do is set the value to each record in the QueryResults object, perhaps then place the record in an array of objects, then issue an UPDATE( Array, False) statement to update all of the records at once.
At this point, when I attempt this, it crashes Notes 7 during the update call. Anyone have a suggestion?
If anyone needs some example code of how to access Salesforce.com with the Office Toolkit, how to Query or Retrieve values, updating, etc. I would be glad to post some code here.
Subject: RE: Who is using salesforce.com?
Hmm… I see… Do you mind to provide me some sample scripts or instructions on how to set this thing up? Thanks.
Subject: Using the Salesforce.com Office Toolkit COM object
You bet. Happy to help.
First, you’ll need to download the Salesforce.com OfficeToolkit from
http://www.sforce.com/us/docs/officetoolkit30/SForce_Office_Toolkit_MSI.zip
You can get help on the API from here:
http://www.sforce.com/us/docs/officetoolkit30/wwhelp/wwhimpl/js/html/wwhelp.htm
Once you’ve installed that (on your workstation as well as any servers that you
might want to run a scheduled agent from), you’re ready to get into the
LotusScript.
Establishing a connection to Salesforce.com.
In your LotusScript agent, you’ll then need to connect to Salesforce.com and
login (I’ll skip the DIMs, etc):
'// Establish a connection to SFDC
Dim sfdc as Variant
Set sfdc = CreateObject( “SForceOfficeToolkit3.SforceSession3” )
Dim loginResult As Variant
loginResult = sfdc.Login(“sfdc_user@xyz.com”, “password”)
If loginResult <> True Then
Call AddLogEntry("Exiting: Unable to login to Salesforce.com due to
bad username or password")
Exit Sub
Else
Call AddLogEntry("Successfully connected to Salesforce.com")
End If
Query some records in Salesforce.com:
'// Use this variable to search for items in Salesforce.com
Dim queryResult As Variant
Dim queryResultSize As Variant
Dim sfdcTable as String
sfdcTable = “account”
'// Look for accounts that start with ‘A’
Set queryResult = sfdc.Query({select id, ownerid, billingstate from } &
sfdcTable & { where name like ‘A%’}, False )
queryResultSize = queryResult.size 'Just so I can see in the
debugger
If queryResult.size >= 1 Then
Forall record In queryResult
'// Retrieve a value from the record.
'// The field must be listed in the Query statement
Print record.Item("BillingState").value
'// Changing a value in SFDC
record.Item("BillingState").value="CO"
Call record.Update
End Forall
End If
Hopefully this gives you some ideas of how you can interact with Salesforce.
In my example above, you can see how I update each account as I’m iterating
through the loop. It would be better if I could change the value to each
object and then do a single UPDATE call for the array of objects. That’s where
LotusScript doesn’t seem to be able to handle it.
Subject: RE: Using the Salesforce.com Office Toolkit COM object
yup, indeed there is something wrong with batch update or more precisely the processing of LotusScript’s arrays of objects. I would have to run it in debugger to see what exactly the problem is. I’ll post back once I have a chance to take a look. I would say that it’s the way LotusScript passes it’s arrays that’s causing the problem but I can’t be really sure until I take a look.
Subject: RE: Using the Salesforce.com Office Toolkit COM object
the problem is as I suspected initially. I would suggest that you open a support case otherwise the likelihood of it being fixed is very slim.
Subject: RE: Using the Salesforce.com Office Toolkit COM object
Okay, I’ll open a support case with Lotus. I wish you’d discovered something I hadn’t!
Thanks for checking this out.
Subject: RE: Using the Salesforce.com Office Toolkit COM object
I have submitted this as a PMR with Lotus (Your PMR number is: 23131 033 000) and will post their response whenever I get one.
Subject: RE: Using the Salesforce.com Office Toolkit COM object
I meant that you open a case with salesforce.
Subject: RE: Using the Salesforce.com Office Toolkit COM object
I’ve already heard back from Lotus and they’ve said the way LotusScript handles arrays of objects is “by design” and that the problem is with the Salesforce.com Office Toolkit.
So now I’ve opened a case with Salesforce.com.
The timing of this may be very good because the current version of the Office Toolkit (3.0) still only works against the 6.0 API. They’re probably already in the works on an Office Toolkit 4.0 to work against the 7.0 API, so maybe they can figure something out!