• Paulo
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 12
    Replies

I'm trying to create an agreement using the echosign appexchange application in salesforce but I am receiving the error below when I try to create the object.

// Create Agreement object
Sforce.SIGN_Agreement__c sfAgreement = new Sforce.SIGN_Agreement__c();

// Set Agreement object properties 
sfAgreement.Recipient__r = contact; 
sfAgreement.Name = "Testing";
sfAgreement.sfAgreement.SignatureType__c = "e-Signature";

More than 1 field provided in an external foreign key reference in entity: Contact
Can someone please help? I'm trying to create a lead in SF using classic asp with theoffice toolking but I keep getting this error "One of the records in the batch call resulted in an error. Examine the records to determine which one(s) failed.".
 
Dim SforceApi
Dim sObject(0)
 
Set SforceApi = server.CreateObject("SForceOfficeToolkit3.SForceSession3.1")
 
if SforceApi.Login("uid","pwd") then
    Set sObject(0) = SforceApi.CreateObject("Lead")
   
    sObject(0).Item("FirstName").value = "Test"
    sObject(0).Item("LastName").value = "Testing"
 
     if SforceApi.Create(sObject,false) then
         Response.Write "Correct insert "
     else
          Response.Write "Error on insert"
     end if
else
     response.Write "login failed"
end if
 
Set SforceApi = nothing
Set sObject(0) = nothing
How can I return the salesforce id from sales force when I create a new lead through a web application? So as soon as I do this:
 
<code>
 
// Add the account to an array of SObjects
Sforce.sObject[] records = new Sforce.sObject[] {sfLead};

// Invoke the create call, passing in the account properties and saving the results in a SaveResult object Sforce.SaveResult[] saveResults = binding.create(records);

</code>

Can salesforce return the id?

Is it possible to create a search on my companies intranet that searches for documents stored on salseforce?

Hi,

I am having problems with the autoassignment rules working when I submit a lead using the api 4.0 into salesforce. The lead owner is always set to the user that I use to log into salesforce. How can I get my app to use the autoassign rules I have set up in salesforce? I am using the 4.0 api, asp.net and c# to develop my app.

I'm getting this error below when I put my files into production for some reason. I noticed that the error below is pointing to files 
in the wrong directory (it looks like my dev environment). I can't find where it is referencing the directory below anywhere in my code. Any ideas why it's pointing to that
directory (highlighted in red below).
 
 System.Net.HttpWebRequest.CheckFinalStatus() +673
   System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) +75
   System.Net.HttpWebRequest.GetRequestStream() +132
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +105
   Credco.Web.SignUp.sforce.SforceService.login(String username, String password) in c:\wwwdev$\signup\Web References\sforce\Reference.cs:46
   Credco.Web.SignUp.AmericorpSatellite.createLead(Customer c) in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:133
   Credco.Web.SignUp.AmericorpSatellite.submitBtnClick() in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:117
   Credco.Web.SignUp.AmericorpSatellite.Page_Load(Object sender, EventArgs e) in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:80
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731

Message Edited by Paulo on 08-24-2004 03:46 PM

I am releasing an application that I have created on to another server that uses the sforce API 4.0 and the web app was written in C#. But I am getting the following error. Any ideas?

The underlying connection was closed: Unable to connect to the remote server.

[WebException: The underlying connection was closed: Unable to connect to the remote server.]
   System.Net.HttpWebRequest.CheckFinalStatus() +673
   System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) +75
   System.Net.HttpWebRequest.GetRequestStream() +132
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +105
   Credco.Web.SignUp.sforce.SforceService.login(String username, String password) in c:\wwwdev$\signup\Web References\sforce\Reference.cs:46
   Credco.Web.SignUp.AmericorpSatellite.createLead(Customer c) in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:133
   Credco.Web.SignUp.AmericorpSatellite.submitBtnClick() in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:117
   Credco.Web.SignUp.AmericorpSatellite.Page_Load(Object sender, EventArgs e) in c:\wwwdev$\signup\mortgage\americorp\default.aspx.cs:80
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731

Hi,

I am trying to submit a lead to salesforce with asp.net in c# and am not having any luck. The code below executes fine but nothing is getting submitted to my salesforce development site. What login and pwd am I suppose to be using and what access rights should the login have? Am I missing something? When I execute the code below it does not return an id with saveResults.

private void createLead() {

//Create the proxy binding and login

sforce.SforceService binding = new sforce.SforceService();

sforce.LoginResult lr = binding.login("login", "pwd");

binding.SessionHeaderValue = new sforce.SessionHeader();

binding.SessionHeaderValue.sessionId = lr.sessionId;

binding.Url = lr.serverUrl;

// Create an account object to send to the service

Credco.Web.SignUp.sforce.Lead sfLead = new Credco.Web.SignUp.sforce.Lead();

// Set several properties

sfLead.FirstName = "Test";

sfLead.LastName = "Tester";

sfLead.LeadSource = "Testing";

// Add the account to an array of SObjects

sforce.sObject[] records = new sforce.sObject[] {sfLead};

// Invoke the create call, passing in the account properties

// and saving the results in a SaveResult object

sforce.SaveResult[] saveResults = binding.create(records);

// Access the new ID

String newID = saveResults[0].id;

}

I think I'm on the right track to creating a lead but I get a "Invalid_Session_ID" error when I try to add the lead. Code is posted below. Am I missing something or what am I doing wrong?

private void createLead() {

//Create the proxy binding and login

sforce.SforceService binding = new sforce.SforceService();

try {

sforce.LoginResult lr = binding.login("login", "pwd");

Session.Add("sessionId", lr.sessionId);

Session.Add("url", lr.serverUrl);

Session.Add("userId", lr.userId);

sforce.Lead lead = new sforce.Lead();

}

catch (Exception ex) {

lblException.Text = ex.Message;

}

binding.Url = Session["url"].ToString();

// Create an account object to send to the service

Credco.Web.SignUp.sforce.Lead sfLead = new Credco.Web.SignUp.sforce.Lead();

// Set several properties

sfLead.FirstName = "Paulo";

sfLead.LastName = "Morales";

sfLead.LeadSource = "Testing";

// Add the account to an array of SObjects

sforce.sObject[] records = new sforce.sObject[] {sfLead};

// Invoke the create call, passing in the account properties

// and saving the results in a SaveResult object

sforce.SaveResult[] saveResults = binding.create(records);

// Access the new ID

String newID = saveResults[0].id;

}

Hi, I am new to salesforce and I am trying to create an asp.net app in c# that will insert leads to salesforce.com from our company's corporate website. I have created a developer account, downloaded the wsdl and added a reference to it in my project and all seems to be working well. But now I need to know how I can insert a record into salesforce.com. Is there any sample code that I can look at in asp.net(c#)? How do I login to salesforce and insert a record etc..  Thanks in advance.

Paulo