Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
9 votes
Accepted

Salesforce email says I'm connecting via TLS 1.0 but that protocol does not appear in login history

An interesting comment from twitter on receiving the email: Raised a case with [Salesforce Support]. They said they are sending it to everyone. @pranayjaiswal Case # 16169927 That would suggest ...
Daniel Ballinger's user avatar
9 votes
Accepted

How to be sure API calls are using TLS 1.2

Check your Login History (under Setup). It now includes a TLS version column. There is also an equivalent field on LoginHistory called TlsProtocol. Another option is to change the API endpoint for a ...
Daniel Ballinger's user avatar
6 votes
Accepted

Trying to upsert product2 - Method not allowed?

To use PATCH, you need to make sure you're encoding the ID. Assuming the URL in your question was generated literally, that's problematic. The URL should look like: /services/data/v41.0/sobjects/...
sfdcfox's user avatar
  • 493k
5 votes

How to check whether Apex class with specific name exists or not using C#.Net?

You can querry the ApexClass using the RestEndpoint and provide your class name in where clause. If it returns record you can say that class exists. You can also query the class code in the body ...
Pranay Jaiswal's user avatar
4 votes
Accepted

How to capture the nested fields on a lead object?

You will also need an Opportunity class with the fields that you have queried from ConvertedOpportunity. Something like (untested): private class Lead { public const String SObjectTypeName = "...
Daniel Ballinger's user avatar
4 votes

Make Salesforce alert my program when a certain change happens

Yes, you'll want to read Setting Up Outbound Messaging for more info. Basically, you set up a workflow rule that triggers when the record is Closed Won, then Salesforce will send a SOAP-based message ...
sfdcfox's user avatar
  • 493k
4 votes

Push data from a website developed in .net to salesforce

If you have not gone through this Apex Web services Trailhead, then it is the best time to complete that. You need to create your Apex Class as a Web Service @RestResource(urlMapping='/Cases/*') ...
Santanu Boral's user avatar
4 votes
Accepted

JWT Token always expires after 'exp' provided in the claims

RFC7523, which defines JWT authentication, specifies in section 3.4 that The authorization server MUST reject any JWT with an expiration time that has passed, subject to allowable clock skew ...
David Reed's user avatar
  • 93.1k
4 votes

c# .NET Example of using JWT OAUTH flow with salesforce

Maybe a bit late, but recently I came across the same requirement and rolled my own implementation. Youn could find it here: ForceDotNetJwtCompanion on github Brief description of the implementation: ...
claboran's user avatar
3 votes

The Id field should not be specified in the sobject data

In Salesforce, record Id's are generated when you insert any record. Once record id's are generated they become Read Only fields. Hence they cannot be modified. In above code, you're trying to make ...
Rohit Mourya's user avatar
  • 3,871
3 votes
Accepted

Custom objects not accessible via REST API

Whenever using (directly or indirectly) the Force.com Describe API calls (REST or SOAP), if the running user doesn't have READ access to the object, then the object, standard or custom, won't be ...
cropredy's user avatar
  • 71.7k
3 votes

Simple SOAP Example in C#

C# has a SOAP bug with a WSDL. I vaguely remember that everything needs an attribute being the cause. Bug information is listed below. You can edit your WSDL to the following to fix the issue: ...
Halfwarr's user avatar
  • 609
3 votes

Bulk API client for .NET

If you don't want to manually perform the Bulk API calls from code you can use the Data Loader. This includes a command line interface that you could use to automate the process as required.
Daniel Ballinger's user avatar
3 votes

DescribeAsync Method usage using C# .Net API

Thank you Daniel, I've followed your recommandations and it works. What I needed in my C# .Net application was to get the Labels and Field names for custom objects, but also the content of the ...
Olivier Crivelli's user avatar
3 votes

Subscribing to a Channel with an Invalid ReplayId?

Best practice is to store replay ID value in your target system. You can then use it on resubscription to retrieve events from SF that are missing from your target. This works for short failure ...
identigral's user avatar
  • 7,616
2 votes

Linking custom object to Lead using Force.com Toolkit for .NET

The following console application ran for me and created the ResourceView__c record associated with the Lead. Note that: The Lead Id was assigned as a string. I needed to add my namespace prefix of &...
Daniel Ballinger's user avatar
2 votes

Asp.Net integration with salesforce ApI and Post data into salesforce lead

It looks like you are using the using the SOAP Partner API. You basically carry on like you did with the describeGlobal call. Make sure the binding has the serverUrl and SessionHeaderValue set with ...
Daniel Ballinger's user avatar
2 votes

How do I call ForceClient.UserInfo() synchronously

Update based on comments. You need to use Task.ConfigureAwait(false); to prevent blocking the UI thread context. See Don't Block on Async Code I made the call synchronously using the following: ...
Daniel Ballinger's user avatar
2 votes
Accepted

"Authentication Error" Response Using Salesforce .NET Toolkit Error

TLS 1.1 or 1.2 is required to access salesforce [always for sandbox, for prod depends on if the critical update is turned on]. Unfortunately the default TLS version for many versions of .NET is 1.0, ...
superfell's user avatar
  • 7,930
2 votes
Accepted

Call REST API From .net application

The URL is case sensitive. Note the capital you have in your URL: /services/data/v37.0/sObjects/Account Instead you want: /services/data/v39.0/sobjects/Account If in doubt, Workbench is a ...
Daniel Ballinger's user avatar
2 votes
Accepted

TLS 1.2 Using Partner wsdl

You can force you C# application to only use TLS 1.2 by adding the following line before making the connection to Salesforce: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; In ...
Daniel Ballinger's user avatar
2 votes

Make Salesforce alert my program when a certain change happens

Outbound messages or a trigger based callout are common solutions based on you hosting a web service for Salesforce to callout to when something changes. Another option is the Streaming API. With this ...
Daniel Ballinger's user avatar
2 votes

Make Salesforce alert my program when a certain change happens

You can use a callout in your trigger (conditions apply, read: HTTP Callout from Triggers), to send data to a external server, which you can host your c# code on. Its unlikely that theres any method ...
battery.cord's user avatar
  • 8,825
2 votes
Accepted

How to get raw response from .NET force.com toolkit when using QueryAsync

Lets go down the rabbit hole! ForceClient.QueryAsync JsonHttpClient.HttpGetAsync BaseHttpClient.HttpGetAsync protected async Task<string> HttpGetAsync(Uri uri) { var responseMessage = ...
Daniel Ballinger's user avatar
2 votes
Accepted

Login to Salesforce SOAP API with .NET

I've run into the "Cannot convert type 'X.Y.ListViewRecordColumn[]' to 'X.Y.ListViewRecordColumn'" error previously. This started happening in Winter '15 (v32.0) when the ListViewRecord complex type ...
Daniel Ballinger's user avatar
2 votes
Accepted

Creating a new sandbox using the Tooling API with .NET

It sounds like you are using the SOAP API version of the Tooling API rather than the REST version. You will need to generate the Tooling API WSDL from a production org. Only production orgs have ...
Daniel Ballinger's user avatar
2 votes
Accepted

"Unable to create/update fields: Address" - but permissions look fine

Address isn't a "real" field, it's a "compound field" (a set of fields that can be queried as one). Instead, you need to set Street, City, State (or StateCode), PostalCode, and Country (or CountryCode)...
sfdcfox's user avatar
  • 493k
2 votes

Changing WSDL breaks client

You should try using the Partner WSDL instead if you expect a lot of change. The Enterprise WSDL changes every time a new field is added whereas the Partner WSDL is loosely typed and does not. A ...
pbattisson's user avatar
  • 3,308
2 votes
Accepted

Cannot get salutation field from contact via REST API

It seems unlikely that you are being impacted by the SOQL Query - Not returning salutation field in some scenarios known issue in this case as you aren't using a relationship query to retrieve the ...
Daniel Ballinger's user avatar
2 votes

How to call an external API from SFMC journey builder?

This can only be achieved using Custom Activity in Journey Builder. You will need to install a Managed Package in Marketing Cloud, build the activity and host it on a web server. The whole setup is ...
zuzannamj's user avatar
  • 14.4k

Only top scored, non community-wiki answers of a minimum length are eligible