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
0 answers
258 views

C# SOAP API Connection to Salesforce using OAuth2.0

Currently working to build a data sync app for an Enterprise WSDL Salesforce Sandbox. I am able to use the simple SforceService Login with UserName, Password + Token but I am trying to connect using ...
C. Singleton's user avatar
0 votes
1 answer
65 views

How to prevent Salesforce from changing the Case Owner when updating a field with C#

I wrote a piece of code that updates some custom fields in several objects, however, when I am trying to update a custom field in Cases the Case Owner is changed to the one set up in Support Settings. ...
Alejandro's user avatar
0 votes
0 answers
758 views

.NET - subscribe to a platform event

I would like to subscribe to a platform event. I am trying to create a client in C#/.NET for the Pub/Sub API (gRPC). There are examples in other languages but not in .NET : https://github.com/...
CoolCat75's user avatar
0 votes
0 answers
114 views

Extract id from salesforce case using (C# script) SSIS works locally but on SQL JOB not

I have a SSIS package with c# code that send case to salesforce from sql table. In order to handle all cases on this script we have a step that will take the salesforce id and store on the file and ...
Ricardo's user avatar
0 votes
0 answers
114 views

How to structure complexvalue fields for the SOAP api

I'm doing some preliminary research for updating a connector my company's software has (which sends data to leads in salesforce) to use a much newer version of the API. (it uses the Partner SOAP ...
MSandstrom's user avatar
1 vote
0 answers
372 views

Cors Prevent Chatbot Einstein Bot to Load

My team developing chatbot using Einstein bot for our website. Currently we cannot load the chatbot except in salesforce preview page. When we try to run chatbot inside our website, it will not loads ...
Ahmad Pujianto's user avatar
0 votes
0 answers
229 views

.NET/C# - Received an invalid SOAP Fault message - Unbound prefix used in qualified name 'sf:INVALID_LOGIN'

.net48 console App soap login error Received an invalid SOAP Fault message: Unbound prefix used in qualified name 'sf:INVALID_LOGIN' Generated the web service from partner wsdl dotnet-svcutil 2.0.3 ...
George Abdelmassieh's user avatar
0 votes
1 answer
158 views

Create custom object using Partner wsdl which has a parent ID (SOAP API)

When creating a new record using the partner wsdl SOAP API how do I add the parent id to the generic sObject. We have a parent record of Account__c and child records of Store_Visit__c My attempted ...
Software Developer's user avatar
2 votes
0 answers
45 views

How do I perform Upsert using Enterprise WSDL v54?

Attempting to use the Upsert function contained in the Enterprise WSDL (Salesforce Sandbox) version 54. Unfortunately not very familiar with SF development or Upserts, the documentation on the ...
Bob P's user avatar
  • 31
0 votes
1 answer
794 views

Unable to login to Salesforce using SOAP API

I am currently working on a project to interface out .Net Core 3.1 application to Salesforce. Unfortunately I am not very familiar with Salesforce and their SOAP API. I have been attempting to find ...
Bob P's user avatar
  • 31
0 votes
1 answer
128 views

Accessing data from a child business unit using SOAP

I am using the SOAP API using C# via a connected service in VS. I am authenticating using the username + password method, which means I have access to the entire SF account (this is not what I want). ...
Phil's user avatar
  • 1
3 votes
1 answer
1k views

Cannot download large files from Salesforce URL using C#

I'm new to Salesforce. I am trying to download a large file (around 13 MB) from Salesforce which needs to be uploaded to Azure Storage using C#. Below is the URL sample: https://mysampleinstance.my....
Dee J.'s user avatar
  • 133
0 votes
1 answer
243 views

DeveloperForce ASP.NET / Bulk API / JSON - Issue Upserting Records and Associating with an External ID

We're developing an implementation for a client with SF's ASP.NET DeveloperForce.Force v2.1.0 library and are hopeful that we can get some help on an issue we can't seem to resolve regarding ...
TPPerlman's user avatar
4 votes
2 answers
2k views

How can I encrypt a string in Apex in a way that an external system can decrypt using C#?

Our security team has found an issue in our lightning experience site where a link to an external system is adding the account # in the URL. That system is then using that account # to display data on ...
Ryan Werner's user avatar
1 vote
1 answer
995 views

Getting INVALID_SESSION_ID on REST Api call in C#

"[{\"message\":\"Session expired or invalid\",\"errorCode\":\"INVALID_SESSION_ID\"}]" I reviewed the other questions posted but no answers helped. I ...
flashsplat's user avatar
0 votes
1 answer
78 views

C# MetaData API create Object and Field

I am getting an error message on the last line of: unexpected Login : Object not set to the instance of an object. Any ideas? MetadataService.CustomObject co = new MetadataService....
CodeMonger's user avatar
0 votes
0 answers
317 views

How can i move 500K records from SQL to Salesforce using Bulk Api?

Is there a step by step example , preferably in c# , which shows how I can move over half a millions records from sql table to a Salesforce entity, namely Account using the Rest Bulk Api ? I have ...
Debbie's user avatar
  • 11
1 vote
1 answer
114 views

Is it possible to create Salesforce Change sets ready to be deployed in Prod programatically?

I can go to my Salesforce sandbox and create a change set with all dependencies and then go to Production and import. But can i do all of this programatically with C# ? So create the change set with ...
Debbie's user avatar
  • 11
0 votes
0 answers
210 views

Is there an example of Salesforce Bulk Api?

I am trying to shift my current code base to start using the Rest service provided by Salesforce instead of Soap particularly the Bulk Api feature. Is there a c# example that shows how for example i ...
Debbie's user avatar
  • 11
1 vote
1 answer
381 views

C# get subquery records of custom object

Let's say I have a query like this: Select Name,Color, (select Id,Amount from Custom_2__r) from Custom_1__c Where Custom_1__c.Id='111' In C# I see that 'Custom_1__c[0].Custom_2__r' is of type ...
LeeFranke's user avatar
  • 335
0 votes
0 answers
389 views

Calling Marketing Cloud APIs from C# via FuelSDK

In am trying to get an access token to call Salesforce Marketing Api through FuelSDK the code is: NameValueCollection parameters = new NameValueCollection(); parameters.Add("clientId"...
Ife Muyiwa's user avatar
0 votes
1 answer
686 views

Using C#, how can I get a jobId for Bulk Api 2.0?

I am trying to set data from an Azure Service Bus to an instance of Salesforce using the Bulk API 2.0 and and REST (because who really wants to deal with SOAP?). I am currently struggling "simply&...
Brian Kessler's user avatar
0 votes
1 answer
263 views

update datetime to null using C# ForceClient in the "Salesforce.Force" namespace [closed]

Here is the c# code I am using to update salesforce object. public async Task<SalesForceResponse> Update(string recordId, BaseEntity record, string SObjectTypeName) { WebProxy proxy ...
user83059's user avatar
1 vote
2 answers
2k views

Publishing an event to Salesforce via CometD

I am trying to create a external client to publish Platform events to Salesforce event bus. I have used REST API to do the same but I wanted to do it via a true 'Publish'. My guess is that this will ...
JaganY's user avatar
  • 106
0 votes
1 answer
69 views

FuelSDK no longer returns data from API integration after client created new Salesforce account

I have a client who recently had to create a new Salesforce account and needed their API integration updated. The API calls that were built before I took over just send over the client id and the ...
Burtwurst's user avatar
1 vote
1 answer
173 views

Rest API URL Query

I have an external application and I am trying to pass through a value using the Rest API URL queries, everything on it works, but when I try to add this one field (it is not custom), it sends me a ...
CodyB's user avatar
  • 13
0 votes
1 answer
1k views

DateTime Format Outputting Wrong Time

I am currently building an external web application using MVC. I need to format the DateTime to match Salesforce's format so I can push it up via API endpoints. The DateTime picker in my View works ...
CodyB's user avatar
  • 13
2 votes
1 answer
471 views

Create custom field using Metadata api C#

I am trying to create a custom field for an existing entity like account with v48 of the Metadata api My code is: MetadataService.CustomField customField = new MetadataService.CustomField(); ...
Austin Lee's user avatar
2 votes
1 answer
179 views

Runtime error when Converting sObject to Account (typecasting)

I'm working on a SOAP integration (.NET C#) to Salesforce and I am facing a problem when I try to get results from Salesforce. To do this I'm using the next example code of the Salesforce walkthrough:...
CrSalesForce's user avatar
0 votes
0 answers
230 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 ...
SamJackSon's user avatar
1 vote
1 answer
2k 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 ...
ruedi's user avatar
  • 137
2 votes
2 answers
950 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 ...
Louis du Beux's user avatar
1 vote
1 answer
3k 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
John's user avatar
  • 11
1 vote
1 answer
706 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/...
joynoele's user avatar
  • 146
2 votes
1 answer
623 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 ...
Daniel Ballinger's user avatar
0 votes
1 answer
71 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 ...
Ken Janka's user avatar
1 vote
1 answer
88 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 ...
Kenneth's user avatar
  • 111
1 vote
0 answers
482 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(); ...
jbeckom's user avatar
  • 31
1 vote
4 answers
2k 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 ...
mercifulhop's user avatar
2 votes
1 answer
455 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 ...
mercifulhop's user avatar
2 votes
1 answer
1k 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 = "...
dotname's user avatar
  • 69
0 votes
1 answer
471 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 ...
mercifulhop's user avatar
6 votes
1 answer
4k 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 ...
Steve D.'s user avatar
  • 121
0 votes
0 answers
103 views

API error when on ETQueryDefinition.get()

This code works fine (I am getting data): ETDataExtension de = new ETDataExtension { AuthStub = mcClient, SearchFilter = new SimpleFilterPart { ...
rokzi's user avatar
  • 1
1 vote
1 answer
291 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 ...
CineTest's user avatar
1 vote
0 answers
697 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 ...
user2260382's user avatar
0 votes
1 answer
2k 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://...
epsoft drive's user avatar
0 votes
0 answers
85 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....
Francis's user avatar
1 vote
1 answer
161 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 ...
gtu's user avatar
  • 113
1 vote
0 answers
232 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....
Francis's user avatar
  • 13

1
2 3 4 5
7