[Salesforce Connector] Salesforce Compatibility Issue?

Forge Component
Published on 19 Feb by Vera Tiago
17 votes
Published on 19 Feb by Vera Tiago
I downloaded the Salesforce Connector and published it in my environment and logged in and connected to my personal Salesforce developer environment.

Immediately on opening I get an Internal Error trying to retrieve 'All Leads" the error is as in Error1Leads attached. All other sample queries are working.

When I try to extend the solution by simply querying Contacts I get a similar error  complaining about fields not being valid.

When I try to extend with a query on Product I get an invalid Object message.

Checking the documentation at http://www.salesforce.com/us/developer/docs/object_reference/index.htm it seems that very few of the records structures in the outsystems SalesforceSample actually match the Salesforce documentation (of which I have no idea if it is up to date).

Is all of this simply compatability issues bewteen my personal salesforce environment (not sure what release that is) and the SalesForce sample or am I doing something basically wrong?

I am running OutSystems Amsterdam in my development environment.



Hi Keith,
That used to be a default field of both Lead and Contacts. Salesforce changed it a couple of years ago if I'm not mistaken. You have 2 options:

1) Change the structure in the connector to remove that field
  • Open the Salesforce_Connector module in the Studio
  • Expand the Structures and remove that attribute from the Leads Field
  • Publish the module and refresh your app references to make sure the structure definition is updated there

2) Make the field available in your SFDC configuration (good for a quick demo, but you'll have to make sure this is the kind of configuration you'll have in production)
  • Login to Salesforce.com, and go to Setup, then Build » Leads » Fields.
  • Click Email Opt Out, Set Field-Level security,
  • select the type of user you are using it will probably say Hidden for all, then check Visible, and Save.

The Forge component doesn't have all the standard fields (nor entities) that are now the default in SFDC. In particular the HasOptedOutOfEmail was kept there for backward compatibility with some of the projects this component was being used on. 
But just like removing a field, adding a new one (or even a custom one in your SFDC configuration) is a simple step: just change the structure to your own needs.

Hope this helps.

OK Thanks I'll try what you suggest and see if I can make it work. 

Thanks. I got that to work OK, a bit of trial and error manages to eliminate the missing fields from the structures. It seems the salesforce documentation is not up to date either. Do you know what the definitive source is for Salesforce Entities and Fields?


I'd say the link you posted is the definitive reference. Better than that, would be just looking at what the actual Fields configuration look like for each of salesforce's entities when you provision a new Developer environment. My setup is already modified to match our organization configuration...
Did you change anything besides removing the "HasOptedOutOfEmail" field? We can make you part of the team and/or update the default set of fields that are bundled with the base component to match the default.
I got the Lead List working by just taking out the "HasOptedOutOfEmail" field.

I created a Contact list having to remove some fields which I roughly noted as DoNotCall, HasOptedOutOfEmail and for some reason the CurrencyISOCode, my MultiCurrencyEnabled site property is set to False in the Connector.

Had no trouble with the Partner but did remove some fields from Campaign but at that point had stopped noting it.

Then for no apparent reason had to go back and remove the CurrencyISOCode from a few places again, but again I had stopped noting where. (I didn't know there would be a quiz :-))

However when I try to synchronize the Salesforce documentation with the fields actually in my (untouched) Salesforce environment, with the OutSystems Connector fields I believe they are all different to each other so I don't really know what fields may be missing from the SalesForce Connector. I was going to try and synchronize one today, so I could understand it.

When I tried Product the whole Object is missing and appears to be now called Product2 with significantly different fields to the Connector, looks like that area has been re-modelled.

It would be nice to have a Base Salesforce Connector, maybe with multiple versions available for each Base Salesforce release, but that's probably not a huge priority of anyones.

I am not doing this for any particular reason other than to understand how to use the connector and customize it as I am talking to a client about using OutSystems to pull together a system pulling data from multiple ERP and custom systems' databases, and I don't have a lot of experience using SalesForce, so far. 

I'll be happy to report back anything I find, but can't guarantee it will be comprehensive.

I got Product2 (the new Product) working with the following attributes: Id, CreatedById,Description,Family (lookup),IsActive, LastModifiedById, Name, ProductCode, Created Date, LastModiifedDate.

Not so spectacular but there is is. Other than developing a function for UserName I didn't do much else. It seems the most reliable source for attribute inof is as you suggested the list in your own environment that you see when you go to customize it, but even that seems to have the odd name difference.

I am interested in the new(ish) SalesForce REST service, I may try and get that going, do you know if anyone is working on any kind of component for that? 

May be able to do some interesting things dynamically with the ObjectDescribe capability, rather than having to have all the static structures predefined.


Can anyone please send me the demo for integrating Salesforce Connector with the Mobile app? 

I tried looking at the Salesforce connector demo in the Plugin, but it is made while keeping web app in mind.

So, I am facing difficulty with integration with Mobile app. I would very much appreciate if you can send me an example app with the workflow needed to integrate. 

Thank you so much!

Best Regards,

Punya Swaroop Sirigiri