The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [c#]

C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, procedural, generic, object-oriented (class-based), and component-oriented programming disciplines.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

C# POCO/Proxy classes for Salesforce REST API

I have a newbie question. Is there a tool or utility to generate proxy classes for Sales force objects to use with REST or SOAP Api? Something similar to what Dynamics CRM has XrmToolkit or ...
0
votes
0answers
37 views

FuelSDK C# API Permission Failed

Currently using the latest FuelSDK from Nuget. Creating the client as such: var parameters = new NameValueCollection { { "clientId", ...
1
vote
1answer
35 views

Calling REST APIs from .NET

I have written a tool to get the OAuth JWT Token Bearer from salesforce but do not know what to do next to get my data. The examples in salesforce look easy but they are using curl and I do not know ...
0
votes
0answers
22 views

sort Parent and child objects in order of execution

I am doing a upsert operation using soap api, but I need sort the sobject in which all parent should be upserted first and the their children. i.e if Lead object is depend on Acount object and contact ...
1
vote
2answers
50 views

Apex Code - Region for as C#

I just want to know, if there is any practice like C# #Region in Apex code? I would like to be able to reduce some parts of my code in Visual Studio Code. Is there any way to do it? For anyone who ...
0
votes
0answers
42 views

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

Does anyone have an example of the JWT oauth implementation in c#? Thanks https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow.htm&type=5
1
vote
1answer
58 views

Bulk API V1 Query - ResultId missing when running concurrent Bulk Jobs

When querying for the result ids of a batch on a closed Bulk (v1) query job, sometimes the result id is not returned; instead the full returned xml is: <result-list xmlns="http://www.force.com/...
2
votes
1answer
97 views

Unable to import binding 'SforceServiceBinding' with the Summer 19 Tooling API WSDL

I'm trying to update to the Summer `19 (v46.0) Tooling API WSDL in a .NET project. When I attempt to update the service reference from the v45.0 WSDL I get the following error from ...
0
votes
1answer
47 views

SObject row was retrieved via SOQL without querying the requested field: s2cor__Sage_INV_Trade_Document_Type__c. s2cor__Use_Company_Shipping__c

I have a C# application that was meant to upload invoices to salesforce financials. All other functions of the application works fine except the uploading module. During the upload process, I have to ...
1
vote
1answer
36 views

Create sObjects related by What field

I am using the SOAP API (in C#) to create new Cases, which will have several Tasks attached. The intent is to be able to view these Tasks under the "Activities > Next Steps" area of the Case view on ...
1
vote
0answers
93 views

ERR 596 SERVICE_NOT_AVAILABLE at ETClient()

I have a very basic Installed Package, with an API Integration component... ...and a very simple connection test... public void TestConnection() { ETClient client = new ETClient(); ...
0
votes
0answers
53 views

Web-to-lead with C#

I'm looking for a sample C# code that shows me how to add a lead into Salesforce. The initial idea is to implement a simple HTTP Post that simulates a Web-to-Lead form post.
0
votes
3answers
435 views

FuelSDK Endpoints Clarification

I can authenticate the REST API through Postman, but I've tried both the python FuelSDK and C# SDK but I can't seem to get either of them to connect to my instance of Marketing Cloud. I think I'm just ...
2
votes
1answer
100 views

App.Config C# Fuel SDK Initialisation

I must be missing something, but I'm not sure what. I'm just trying to initialise the FuelSDK. I installed the package through NuGet, and I'm just doing some super basic code, but it fails on ...
2
votes
1answer
97 views

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

I've tried implementing a JWT Bearer Token Flow. I followed the documentation on here. The code is originally in Java but I managed to adapt it to c# as the code below shows. String header = "...
0
votes
1answer
114 views

Fuel SDK Endpoint settings

I've downloaded the C# SFMC Fuel SDK and I'm stuck at a rather ignominious place. Where do I get the end points? I looked at this link, but where am I supposed to get the appSignature, clientID and ...
4
votes
1answer
127 views

Bulk API v2 Get Job Status Failing - InvalidBatch : Field name not found

I've been beating my head against the wall of the Salesforce Bulk API v2.0 for a couple of weeks now and I'm at my wits end. I've been able to use Postman to test most of the calls and they appear to ...
0
votes
0answers
43 views

API error when on ETQueryDefinition.get()

This code works fine (I am getting data): ETDataExtension de = new ETDataExtension { AuthStub = mcClient, SearchFilter = new SimpleFilterPart { ...
1
vote
1answer
64 views

Contact not appearing on salesforce marketing cloud for Mobile Push

I have created marketing cloud android sdk bindings for xamarin. I have all the required information to configure sdk to my app. I have set custom contactKey but it's not showing on marketing cloud ...
1
vote
0answers
280 views

SOAP API Implementation using .NET CORE

We are trying to migrate this SOAP API call from .NET to .NET CORE. Kindly help on creating .NET Core client code/proxy class using this file - https://webservice.exacttarget.com/etframework.wsdl ...
0
votes
1answer
498 views

“The remote server returned an error: (401) Unauthorized.” Getting this issue while authenticate salesforce using c#

Getting Following issue while authenticate salesforce using C#: The remote server returned an error: (401) Unauthorized. My code: var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://...
0
votes
0answers
26 views

SalesForce OutBound message Server chose TLSv1, but that protocol version is not enabled or not supported

I have a listener on a ASMX webservice here is the following code: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Web; using System.Web....
1
vote
1answer
30 views

Service Reference in .net for Debug and Release

I am writing a small program in .net (C#) which is connecting with Salesforce. I downloaded wsdl file from both production and sandbox environment. What is the correct way of using the service ...
1
vote
0answers
55 views

System.IndexOutOfRangeException on OutBound Message Listener [closed]

I have a webservice in ASMX and I am trying to create a Listener and here is what I have in the webservice.cs file using System; using System.Collections.Generic; using System.Linq; using System....
0
votes
0answers
32 views

INotificationBinding Could not be found

I am following this Example to get started with the notification listner and I did exactly everything as the documentation said and I have the DLL file in the Bin folder which was created from WSDL ...
0
votes
1answer
88 views

Building a Listener in c# asp.net [closed]

I am new to Sales Force and I am building a Listener that generally listens to outbound messages from salesforce. 1st. I don't have a staging server or testing server to test this when sending ...
3
votes
1answer
56 views

Aggregate Query issue using Tooling API / Partner/SOAP API with C#

I wrote a utility that cycles through a bunch of orgs and pulls out information. I'm using the Partner SOAP API and C# to do this. Now, I'm trying to get some additional information that is only ...
1
vote
0answers
85 views

(405) Method Not Allowed on all FuelSDK requests

I am using C# and the FuelSDK to use the Marketing Cloud API. I have tried multiple methods but they each give me the same Exception -> Method Not Allowed. I looked into this but i couldn't find the ...
1
vote
0answers
68 views

How do I insert my credentials into the Client when using the ExactTarget S6 WSDL

I have imported the S6 WSDL into Visual Studio 2013 to generate the client code however I cannot figure out how to give it the clientSecret, clientId and/or auth token so that it can actually perform ...
1
vote
1answer
88 views

C# Get SessionId returns affinity token empty (“”)

When im doing the GET request to get the affinityToken, its come empty {"key":"b99d9a87-c7db-4f5a-a20d-9419bb2d0ad0!1549978665283!x6db6+hNaLzITCEq9EcjFLyKAjw=","id":"b99d9a87-c7db-4f5a-a20d-...
0
votes
1answer
102 views

How to create a Purchase Order record in Salesforce using CreateAsync method in c#

I'm a newbie to salesforce and i want to create a custom Purchase Order record using CreateAsync method of Force.com Tool. I'm successfully able to create a record when i'm just passing the parameter ...
2
votes
1answer
42 views

How can I setup a scheduled sync from a SQL Server database to Salesforce Big Objects?

What is the best way to have a daily scheduled insert/update of a SQL Table into Salesforce Big Objects? We currently have a C# adapter to update Salesforce standard object records with SQL database ...
0
votes
1answer
404 views

INVALID_LOGIN: Invalid username, password, security token; or user locked out. using C#

I am using the API for WSDL when using the Login method gives me the error, "INVALID_LOGIN: Invalid username, password, security token, or user locked out." I am using "Salesforce.com Enterprise Web ...
1
vote
1answer
39 views

How to perform SOQL query after retrieving access_token and instance_url via oAuth2 flow?

I have successfully setup my oAuth2 flow, created a Connected App and I can retrieve an access_token and instance_url just fine. Now that I have those two pieces of data, how can I perform SOQL ...
0
votes
2answers
548 views

C# REST API “PATCH” workaround

Has anyone had any luck getting a PATCH or other method to update an object to work in the REST API in C#? Whenever I try to use patch I get this response StatusCode: 405, ReasonPhrase: 'Method Not ...
2
votes
1answer
202 views

Invalid customer key error when sending an email with with the “Fuel SDK for C#”

I'm trying to send an email with the Fuel SDK for C#, but am running into issues with an invalid customer key error. I've double checked my customer key is correct, perhaps there is something else I'm ...
0
votes
1answer
270 views

Trouble Using Bulk API 2.0 Multipart Request

I am sending up this payload --BOUNDARY Content-Type: application/json; charset=utf-8 Content-Disposition: form-data; name="job" {"columnDelimeter":",","contentType":"CSV","lineEnding":"\r\n","object"...
0
votes
1answer
338 views

Trouble with Creating a Job for Bulk API 2.0

I'm Using this documentation https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/create_job.htm With this URI https://cs30.salesforce.com/services/async/44.0/jobs/ingest ...
1
vote
2answers
224 views

Changing WSDL breaks client

I have auto-generated a C# client from a WSDL (https://eu7.salesforce.com/setup/build/generateEnterpriseWsdl.apexp). This works fine until someone changes the structure of one of the tables I'm ...
2
votes
2answers
388 views

Partner API describeSObject on Contact fails with “Instance validation error: 'urn:address' is not a valid value for soapType.”

We're trying to pull down picklist values from the Contact object to show on an ASP.Net page using the Partner API. However, we receive the following error when the describeSObject call is made. "...
0
votes
1answer
376 views

Salesforce Rest API patch operation - Bad Request

I'm trying to invoke a PATCH operation on our organization's Salesforce API. The url is correct (format - https://xxxx.salesforce.com/services/data/v43.0/sobjects/Classification__c/objectid?...
3
votes
1answer
54 views

How to retrieve a user's default profile photo, based on theme set for org, using Chatter API?

I'm trying to get a user's default profile photo using the chatter api. My company's admin, created a custom image that will show up if the user hasn't uploaded their own image. I've been reading ...
4
votes
1answer
448 views

Trying to upsert product2 - Method not allowed?

I am using this library in C# to make REST calls to SalesForce: https://github.com/developerforce/Force.com-Toolkit-for-NET I've run into a problem when trying Upsert into Product2. Here is the error ...
2
votes
1answer
542 views

Creating a new sandbox using the Tooling API with .NET

I'm trying to use the Tooling API in order to create new sandboxes via a Console application in .NET, with C#. So far I've been able to authenticate with the partner wsdl and perform overall queries, ...
1
vote
1answer
519 views

How to retrieve FieldSets and their fields of an object via the API?

I work on a .NET program retrieving some metadata of a given Salesforce org via the API. I have already managed to retrieve a list of all standard and custom objects in my salesforce org via the REST ...
1
vote
0answers
39 views

Can't Access sObject 'type' Property

I am following a Salesforce tutorial using Soap to create and modify Salesforce objects using C#. I downloaded a WSDL from my org and have added it as a web reference in my project and I can ...
1
vote
0answers
121 views

Salesforce API C# Whitelist Server Proxy Authentication Required Login Issue

I was wondering if someone can help me with a login issue I am having with my .NET application. I have whitelisted the server with salesforce IPs through my company but I am still getting a (407) ...
0
votes
1answer
377 views

Retrieving a RequestToken with .NET Core in C# using FuelSDK

I'm trying to write a small SFMC API so that I can integrate it with our SQL server. After a few hours of failing to get this working in a SQL procedure (which would be ideal) I decided to give .NET a ...
0
votes
1answer
228 views

asp.net signalr with Salesforce [closed]

I am creating a real time application in asp.net core to show any new account created in salesforce. I am thinking of using signalR for push notification. Also I want to use signalR to send a response ...
1
vote
1answer
175 views

Currency Type (Object) Updating Causing Error as “RSF CALCULATION IS IN PROGRESS”

I am using the below code to integrate with salesforce. I will receive the exchange rate from the JSON webservice and update the currency type object. the code works fine. It's not all the rates are ...