[Salesforce Connector] Discussion

Forge Component
Published on 2018-12-04 by OutSystems R&D
16 votes
Published on 2018-12-04 by OutSystems R&D
where is the salesforce connector?
Hi Craig,

The Salesforce.com Connector is now available for download. Check it out.

Pedro Gonçalves
Hi Everyone,

Even though I am not a Visual Studio type of person, I did try to convert this connector to 5.1 CE. Had to upgrade Visual Studio 2005 to 2008. Started working with the Extension first,cleaned up most of the errors and now I'm stuck withan 'unable to copy app.config'. Does anyone know how to solve this?

The attached ZIP file contains the .XIF, as far as I've gone, and a Word document with the conversion attempts. The remaining error is on the last page of the Word doc.

Thanks in advance for any assistance,

Alex C.

Hi Alex,

Have you tried to exclude the app.config file from the project? It seems to work and the build succeeds. I've tried in in 5.1

Take a look at the snapshot in attach.

Hi Pedro,

My deepest apologies for not thanking you sooner. We had a major implementation in September involving about 17 systems, sub-systems, interfaces, and data base conversions. OutSystems and SalesForce connection took a back seat.

Anyway, I do want to thank you for the advice! The build worked just fine once I removed the app.config. Of course, there were some other little warning messages that I cleaned up in the process.

Attached is a ZIP file containing the SForce.xif and SForce.oml upgraded to 5.1.22. I also added a test screen to the eSpace as documented in the Word file in the ZIP.

I am again at a point where I cannot proceed anymore and advice help J. The last message I received (as shown in the Word document) is:

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

Anyone have any clues?

Thanks in advance,

Alex C.
Hi Alex,

I've experienced the same output with the URL property mentioned in your Word doc. After looking into my past projects' usage of Salesforce.com Connector I've noticed that the entrypoint was very different: https://www.salesforce.com/services/Soap/u/11.1

Try this one out and let me know the result. In my case, the login was successful.

Have fun!

I tried the URL you suggested (substituting 'cs2', sandbox, for 'www', production) and I was able to login. Now the real fun begins :). Once I get the demo workspace running (already gave me an error on 'user' that I need to research), I will ;post the 5.1 version here. Hopefully, I will not get into any more difficulties. 

Thanks for all your help.

Alex C.
Pedro, the generated query includes two fields, OptimizedAttributes and OriginalKey, that are NOT in the passed structure. I really tried to figure this one out but got to a point beyond my debugging skills with C#. Please see the attached Word document for more details.


Alex C.
After doing some more debugging today I believe I have the problem narrowed down to 1 of 2 lines. I cannot figure it out any more and really need some C# help here, please. Attached is another word document continuing where I left off yesterday.

Thanks for your help,

Alex C.

Took a while but finally found a workaround. Still do NOT understand the cause of the problem with the two bogus field names being generated but at least the workaround lets me actually retrieve data from SFDC.

My tests included both the USER and ACCOUNT tables. Even added a dummy entry to the ACCOUNT structure... It showed up on the generated SELECT statement and those two fields were right there after my dummy entry.

If anyone knows the real solution please let me know.  Here is my workaround with the changes highlighted:

public static string[] GetSalesforceFieldNamesFromOutSystemsRecord (System.Object osObject) {
Type osType = osObject.GetType ();
if (! (typeof (IRecord).IsAssignableFrom (osType)) ) {
throw new ObjectMappingException ("Expected " + typeof(IRecord).FullName + " instead of " + osType.FullName);
object osStructObj = GetStructureObject ((IRecord)osObject);
Type osStructType = osStructObj.GetType ();
FieldInfo[] fields = osStructType.GetFields ();
            ArrayList names = new ArrayList ();
foreach (FieldInfo field in fields) {
                if (field.Name != "OptimizedAttributes" & field.Name != "OriginalKey")
return (string[])names.ToArray (typeof (string));

Salesforce.com Connector 5.1 CE

Attached is a version of the Salesforce.com Connector updated to CE.


* It does NOT have all the components of the original 4.2 version -- only one oml and the extension
* Only the 'find' and 'find by id' functions were tested -- I currently have no need for the other actions
* The ACCOUNT and CONTACT structures have been updated to reflect all standard fields in the Winter '11 version of Salesforce
* NO changes or testing done with other structures
* The included oml came from the original package -- a test screen was added
* The URL site property needs to be updated with YOUR instance of Salesforce


Alex C.

When i publish the salesforce connector I have several errors (I'm using service studio but the Sforce is instaled.

when I tried to use like the video sample ia have this error ""'SForce_Login' Action is incompatible with the 'SForce' extension definitition".

Someone can help me?
Hi Frederico,
Have you published the SForce Extension with success? Don't you have any broken references?
Are you passing all the attributes correctly? have you already debugged the login action to see what is going on?
Hi João the extension is now published with suces. my error is when a tried the "AccountsFind" action the result is: 

There was an error processing your request:

SELECT Id, AccountNumber, AnnualRevenue, BillingCity
ERROR at Row:1:Column:12
No such column 'AccountNumber' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. 

Any solutions??

It seems that the action tries to get a field that do not exists! 
Does the structure you are passing as RecorList have the exact same names that you have in the Sforce DB? Maybe the structure have the name AccountNumber and the real name is AccountNumber__c, try to change the structure names, or first try to do the query on the SForce side with something like "SELECT Id, AccountNumber FROM Account" and see what happen, are you able to do this test?
Note: I've took a look at the Extension and the action SForce_Find uses a method that seems to convert the names from the structure in the parameters that will be used at the SELECT statement, so, the problem may be here.

Hi everyone!

I just uploaded a new version of the Salesforce Connector.

Among other fixes, the connector now works with the Java version of the Agile Platform.
Also, all previous compilation warnings and Visual Studio woes should be gone.

To use this you need at least version 7.0 of the Agile Platform.

Luís Picciochi