Skip to content
Diego Giacomelli edited this page Jul 31, 2019 · 8 revisions

Q. Does SalesforceSharp support operations like Create, Update, Delete and query against an alternative/custom end-point?

Yes, it does. Take a look on this explanation: https://github.com/giacomelli/SalesforceSharp/pull/1#issuecomment-29559620

Q. How to fix the "expired access/refresh token" error when I call client.Authenticate(authFlow)?

A. If you are passing all needed information to IAuthenticationFlow's implementation, maybe you are pointing to the wrong end-point, see below:

  • Sandbox end-point: https://test.salesforce.com/services/oauth2/token
    • This end-point is available only for accounts that have purchased a sandbox. If you are using a Developer Edition Account you don't have access to this end-point, because the Developer Edition account can't be upgraded to production and should use the production end-point.
  • Production end-point: https://login.salesforce.com/services/oauth2/token
    • This end-point is used for production, except for Developer Edition accounts. Developer Edition accounts use this as a sandbox end-point.

See more at http://wiki.developerforce.com/page/An_Introduction_to_Environments.


Q. The SalesforceClient.Query method is returning the right number of records, but all fields are null. What's wrong?

A. Nowadays our DynamicJsonDeserializer only supports binding on public properties. For this reason, all columns in the SELECT's projection should be public properties on the target class, or in other words: PUBLIC FIELDS ARE NOT SUPPORTED.


Note: custom objects are return from Salesforce with the __c suffix, for this reason you need to add the same suffix to your class properties.

Q. Where I can get my client id and client secret?

A. Log in your Salesforce account and go to Setup > Build > Create > Apps.

Edit (click in the name of the app) or create your app in "Connected Apps" section. Your client id (consumer key) and client secret (consumer secret) will be on "API (Enable OAuth Settings)" section.


Q. Where I can get my Security Token?

A. Log in your Salesforce account and go to [your name] > My settings > Personal > Reset My Security Token.

Remenber: if your IP is not in the whitelist, you'll need to append you API security token to the password when using UsernamePasswordAuthenticationWorkflow.

Clone this wiki locally