• Don Hobson
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

I am writing a web service where I move data between two SF environments using two different Enterprise WSDL, a web service and C#. I have both WSDLs loaded and if I remove one, I don't have a problem.

 

For example, I want the Accounts in sforce_Enterprise to sync with the accounts in ACMEenterpriseWebRef

 

Environement A: sforce_Enterprise 

Environement B: ACMEenterpriseWebRef

 

I can successfully use each one correctly if the other is commented out. Meaning my C# app can get a list of Accounts from each with web services.

 

While BOTH are enabled\not commented out, I am having the following issues.

 

using ACMEIntegrationConsoleApp.sforce_Enterprise;

using ACMEIntegrationConsoleApp.ACMEenterpriseWebRef;

 

Here is my problem

 

private static SforceService sfdc;

 

 

// Create a service object

sfdc = new SforceService(); <--- Fails

 

// Try logging in

LoginResult lr; <--- Fails

 

Multiple Errors

 

Error 215 'LoginResult' is an ambiguous reference between 'ACMEIntegrationConsoleApp.sforce_Enterprise.LoginResult' and 'ACMEIntegrationConsoleApp.ACMEenterpriseWebRef.LoginResult' C:\Users\Administrator\Documents\Visual Studio 2012\Projects\proservices\src\integration\soap\ACME\csharp\ACMEIntegrationConsoleApp\ACMEIntegrationConsoleApp\Program.cs 236 13 ACMEIntegrationConsoleApp

 

 

This makes sense because both of my WSDLs are from Salesforce, they are just from different Enterprise Orgs.

 

.sforce_Enterprise;

<service name="SforceService"> <documentation>Sforce SOAP API</documentation> <port name="Soap" binding="tns:SoapBinding"> <soap:address location="https://login.salesforce.com/services/Soap/c/27.0/0DFi0000000Gnix" /> </port> </service>

 

ACMEenterpriseWebRef

<service name="SforceService"> <documentation>Sforce SOAP API</documentation> <port name="Soap" binding="tns:SoapBinding"> <soap:address location="https://test.salesforce.com/services/Soap/c/27.0/0DFZ0000000CapT" /> </port> </service>

 

Hopefully this is clear enough for someone to impart their wisdom on me.

I am writing a web service where I move data between two SF environments using two different Enterprise WSDL, a web service and C#. I have both WSDLs loaded and if I remove one, I don't have a problem.

 

For example, I want the Accounts in sforce_Enterprise to sync with the accounts in ACMEenterpriseWebRef

 

Environement A: sforce_Enterprise 

Environement B: ACMEenterpriseWebRef

 

I can successfully use each one correctly if the other is commented out. Meaning my C# app can get a list of Accounts from each with web services.

 

While BOTH are enabled\not commented out, I am having the following issues.

 

using ACMEIntegrationConsoleApp.sforce_Enterprise;

using ACMEIntegrationConsoleApp.ACMEenterpriseWebRef;

 

Here is my problem

 

private static SforceService sfdc;

 

 

// Create a service object

sfdc = new SforceService(); <--- Fails

 

// Try logging in

LoginResult lr; <--- Fails

 

Multiple Errors

 

Error 215 'LoginResult' is an ambiguous reference between 'ACMEIntegrationConsoleApp.sforce_Enterprise.LoginResult' and 'ACMEIntegrationConsoleApp.ACMEenterpriseWebRef.LoginResult' C:\Users\Administrator\Documents\Visual Studio 2012\Projects\proservices\src\integration\soap\ACME\csharp\ACMEIntegrationConsoleApp\ACMEIntegrationConsoleApp\Program.cs 236 13 ACMEIntegrationConsoleApp

 

 

This makes sense because both of my WSDLs are from Salesforce, they are just from different Enterprise Orgs.

 

.sforce_Enterprise;

<service name="SforceService"> <documentation>Sforce SOAP API</documentation> <port name="Soap" binding="tns:SoapBinding"> <soap:address location="https://login.salesforce.com/services/Soap/c/27.0/0DFi0000000Gnix" /> </port> </service>

 

ACMEenterpriseWebRef

<service name="SforceService"> <documentation>Sforce SOAP API</documentation> <port name="Soap" binding="tns:SoapBinding"> <soap:address location="https://test.salesforce.com/services/Soap/c/27.0/0DFZ0000000CapT" /> </port> </service>

 

Hopefully this is clear enough for someone to impart their wisdom on me.

We have a C# application that works with our managed package. Before we switched to a managed package everything worked fine. Since swithcing to a managed package and adding the namespace in the C# code, it is failing on queries of custom objects with 

 

" INVALID_TYPE: sObject type 'namespace__Client__c' is not supported."

 

The WSDL has been updated.

 

What is confusing to us is the query

 

SELECT namespace__Account_Number__c FROM Accounts

 

works fine.

 

What does not work is 

 

SELECT namespace__Account_Number__c FROM namespace__Client__c

Hey everyone,

 

Hello SalesForce World, first time posting!

 

I am working on a User Management C# service from our internal systems to SalesForce. 

 

I wanted to bring back the ID, Name values for sObjects using a generic function that returned the  value pair. But I wanted to just pass the sObject type as a string to a function that returns the key pair values. 

 

Has anyone done this before? I really haven't found a way myself to create an sObject with a string parameter.

 

Richard. D. James

using System;
using System.Collections.Generic;
using System.Text;
using WSDL.com.salesforce.Enterprise;

namespace WSDL
{
class MainFunction
{
static void Main()
{
SforceService connection = new SforceService();
LoginResult sfLoginResult = connection.login("XXX, "XXX");


connection.Url = sfLoginResult.serverUrl;
connection.SessionHeaderValue = new SessionHeader();
connection.SessionHeaderValue.sessionId = sfLoginResult.sessionId;

Lead sfLead = new Lead();

sfLead.FirstName = "Mayer";
sfLead.LastName = "asdasd";
sfLead.Company = "asdas";
sfLead.Title = "asdas";
sfLead.Phone = "asdas";
sfLead.Email = "asdas";
sfLead.State = "asdas";
sfLead.LeadSource = "Web";


SaveResult[] sr = connection.create(new sObject[] { sfLead });

Console.ReadKey(true);
}
}
}