• RajeevKumar
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 15
    Replies

I am trying to extract  LastModifiedBy field (LastModifiedBy datatype lookUP) from Lead table getting following error

No such column 'LastModifiedBy' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

 

 

How to extract this field, I an using partner's  webservice.

Please help. 

 

 

 

I am writing lead upload program in C# by using partner API. I am able to upload all the fields. But
my problem is when we are try to convert this lead(into opportunity) its not automatically populating Account Name and Opportunity Name fields. How to achieve this.
Please help.

Thanks,
Rajeev
Errors were found on item 0
Error code is: INVALID_FIELD
Error message: The external foreign key reference does not reference a valid entity: RecordType

How to fix, please help.
I have following field , like to populate from partner api

Field Label Lead Generator Last Name Object Name Lead
Field Name Lead_Generator_Last_Name Data Type Lookup
API Name Lead_Generator_Last_Name__c
Description
Help Text
Created By Corp Admin, 5/9/2008 5:46 PM Modified By rajeev , 9/4/2008 6:31 PM
Lookup Options
Related To Office Employee Child Relationship Name Leads
Related List Label Leads

getting following errors:
INVALID_FIELD: No such column 'Lead_Generator_Last_Name' on entity 'lead'.
Please help.
How to populate Lead Generator First Name & Lead Generator Last Name, using partner api.I am getting following errors:

Errors were found on item 0
Error code is: MALFORMED_ID
Error message: Lead Generator Last Name: id value of incorrect type: LeadGenLName


Please help.
Thanks.
I can see field name for owner is Owner , but how to insert owner , using partner api.
getting error
Errors were found on item 0
Error code is: INVALID_FIELD
Error message: The external foreign key reference does not reference a valid entity: Owner
Please help.
How to get sample code for Sales Lead upload code in C# by using partner.wsdl.

Thanks.
How to fix this error.
getting this error on line
string fName = con.Any[0].InnerText;

Please help.

My code:


private void querySamplenew()
{
QueryResult qr = null;
sfdc.QueryOptionsValue = new sforce.QueryOptions();
sfdc.QueryOptionsValue.batchSize = 250;
sfdc.QueryOptionsValue.batchSizeSpecified = true;

qr = sfdc.query("select FirstName, LastName from Contact");

bool bContinue = true;
int loopCounter = 0;
while (bContinue)
{
Console.WriteLine("\nResults Set " + Convert.ToString(loopCounter++) + " - ");
//process the query results
for (int i=0;i {
sforce.sObject con = qr.records[i];
string fName = con.Any[0].InnerText;
string lName = con.Any[1].InnerText;
if (fName == null)
Console.WriteLine("Contact " + (i + 1) + ": " + lName);
else
Console.WriteLine("Contact " + (i + 1) + ": " + fName + " " + lName);
}
//handle the loop + 1 problem by checking to see if the most recent queryResult
if (qr.done)
bContinue = false;
else
qr = sfdc.queryMore(qr.queryLocator);
}
Console.WriteLine("\nQuery succesfully executed.");
Console.Write("\nHit return to continue...");
Console.ReadLine();
}
Guys
I am new to sales force webservices , I can login to server but not able to query on database. Getting Following error
Please help.

Compiler Error Message: CS0103: The name 'binding' does not exist in the current context
Source Error:
Line 57: {
Line 58: QueryResult qr = null;
Line 59: binding.QueryOptionsValue = new sforce.QueryOptions();
Line 60: binding.QueryOptionsValue.batchSize = 250;
Line 61: binding.QueryOptionsValue.batchSizeSpecified = true;
source code is

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using sforce;

public partial class Default2 : System.Web.UI.Page
{
public SforceService sfdc = new SforceService();
private LoginResult loginResult = null;
protected void Page_Load(object sender, EventArgs e)
{

logininfo();
querySample();

}

private void logininfo()
{
sfdc = new SforceService();
try
{
LoginResult lr = sfdc.login("xxxxxx", "xxxxxxx");
sfdc.Url = lr.serverUrl;

sfdc.SessionHeaderValue = new SessionHeader();
sfdc.SessionHeaderValue.sessionId = lr.sessionId;


//Displaying the Session ID and URL
Label1.Text = "The session id is: " + lr.sessionId;
Label1.Text += "
The new server url is: " + lr.serverUrl;

//Displaying the user Details
GetUserInfoResult userResults = new GetUserInfoResult();
userResults = sfdc.getUserInfo();
Label1.Text += "
User Name : " + userResults.userFullName;
Label1.Text += "
User Email : " + userResults.userEmail;
//Label1.Text += "
User License : " + userResults.licenseType;
}

catch (Exception exp)
{
Label1.Text = exp.ToString();
}


}
private void querySample()
{
QueryResult qr = null;
binding.QueryOptionsValue = new sforce.QueryOptions();
binding.QueryOptionsValue.batchSize = 250;
binding.QueryOptionsValue.batchSizeSpecified = true;

qr = binding.query("select FirstName, LastName from Contact");

bool bContinue = true;
int loopCounter = 0;
while (bContinue)
{
Console.WriteLine("\nResults Set " + Convert.ToString(loopCounter++)
+ " - ");
//process the query results
for (int i=0;i {
sforce.sObject con = qr.records[i];
string fName = con.Any[0].InnerText;
string lName = con.Any[1].InnerText;
if (fName == null)
Console.WriteLine("Contact " + (i + 1) + ": " + lName);
else
Console.WriteLine("Contact " + (i + 1) + ": " + fName
+ " " + lName);
}
//handle the loop + 1 problem by checking the most recent queryResult
if (qr.done)
bContinue = false;
else
qr = binding.queryMore(qr.queryLocator);
}
Console.WriteLine("\nQuery succesfully executed.");
Console.Write("\nHit return to continue...");
Console.ReadLine();
}
}

I am trying to extract  LastModifiedBy field (LastModifiedBy datatype lookUP) from Lead table getting following error

No such column 'LastModifiedBy' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

 

 

How to extract this field, I an using partner's  webservice.

Please help. 

 

 

 

I am writing lead upload program in C# by using partner API. I am able to upload all the fields. But
my problem is when we are try to convert this lead(into opportunity) its not automatically populating Account Name and Opportunity Name fields. How to achieve this.
Please help.

Thanks,
Rajeev
Using a C# receiver we currently are executing an Apex class using a user name and password. This is working as planned and the login code segment is below:
Code:
SForce.SforceService sfdc = new SForce.SforceService();
SForce.LoginResult lr = sfdc.login("un@acme.com", "passwordU6RQC66T6hpZTuaY960FX3QvS");

Instead of using user credentials, we'd like to execute the same Apex class with the Session id that is being passed in the outbound message. When we make the change to the code segment we are finding that the Apex class does not execute. The login code segment is below: 
Code:
String strSessionID = notifications1.SessionId;
SForce.LoginResult lr = new LoginResult();
lr.sessionId = strSessionID;
lr.serverUrl = https://cs2.salesforce.com/home/home.jsp;

Are there any omissions in the sesson id code segment (above) that would prevent us from executing the Apex class? Welcome the thoughts and comments.
I have datetime field in salesforce.
When i assign the value of '2008-11-26 17:24:24" it saves it as "11/26/2008 9:24 AM".  I don't want this conversion, what should i do?
I am converting a website to asp.net and running into problems with my Web-To-Lead forms. I need to use use the .NET server controls in my form so my text box code would be something like:
<asp:TextBox ID="first_name" runat="server" />
instead of:
<input name="first_name" type="text" />

The problem with this is that .NET renames the input fields. The resulting HTML comes out like this:   

<input name="ctl00$content$first_name" type="text" id="ctl00_content_first_name" />

Salesforce won't accept this as it reuqires the field in this case must be named "first_name", not "ctl00$content$first_name".

Has anyone run into this and if so how did you get around it?

Errors were found on item 0
Error code is: INVALID_FIELD
Error message: The external foreign key reference does not reference a valid entity: RecordType

How to fix, please help.
I can see field name for owner is Owner , but how to insert owner , using partner api.
getting error
Errors were found on item 0
Error code is: INVALID_FIELD
Error message: The external foreign key reference does not reference a valid entity: Owner
Please help.
How to fix this error.
getting this error on line
string fName = con.Any[0].InnerText;

Please help.

My code:


private void querySamplenew()
{
QueryResult qr = null;
sfdc.QueryOptionsValue = new sforce.QueryOptions();
sfdc.QueryOptionsValue.batchSize = 250;
sfdc.QueryOptionsValue.batchSizeSpecified = true;

qr = sfdc.query("select FirstName, LastName from Contact");

bool bContinue = true;
int loopCounter = 0;
while (bContinue)
{
Console.WriteLine("\nResults Set " + Convert.ToString(loopCounter++) + " - ");
//process the query results
for (int i=0;i {
sforce.sObject con = qr.records[i];
string fName = con.Any[0].InnerText;
string lName = con.Any[1].InnerText;
if (fName == null)
Console.WriteLine("Contact " + (i + 1) + ": " + lName);
else
Console.WriteLine("Contact " + (i + 1) + ": " + fName + " " + lName);
}
//handle the loop + 1 problem by checking to see if the most recent queryResult
if (qr.done)
bContinue = false;
else
qr = sfdc.queryMore(qr.queryLocator);
}
Console.WriteLine("\nQuery succesfully executed.");
Console.Write("\nHit return to continue...");
Console.ReadLine();
}
Guys
I am new to sales force webservices , I can login to server but not able to query on database. Getting Following error
Please help.

Compiler Error Message: CS0103: The name 'binding' does not exist in the current context
Source Error:
Line 57: {
Line 58: QueryResult qr = null;
Line 59: binding.QueryOptionsValue = new sforce.QueryOptions();
Line 60: binding.QueryOptionsValue.batchSize = 250;
Line 61: binding.QueryOptionsValue.batchSizeSpecified = true;
source code is

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using sforce;

public partial class Default2 : System.Web.UI.Page
{
public SforceService sfdc = new SforceService();
private LoginResult loginResult = null;
protected void Page_Load(object sender, EventArgs e)
{

logininfo();
querySample();

}

private void logininfo()
{
sfdc = new SforceService();
try
{
LoginResult lr = sfdc.login("xxxxxx", "xxxxxxx");
sfdc.Url = lr.serverUrl;

sfdc.SessionHeaderValue = new SessionHeader();
sfdc.SessionHeaderValue.sessionId = lr.sessionId;


//Displaying the Session ID and URL
Label1.Text = "The session id is: " + lr.sessionId;
Label1.Text += "
The new server url is: " + lr.serverUrl;

//Displaying the user Details
GetUserInfoResult userResults = new GetUserInfoResult();
userResults = sfdc.getUserInfo();
Label1.Text += "
User Name : " + userResults.userFullName;
Label1.Text += "
User Email : " + userResults.userEmail;
//Label1.Text += "
User License : " + userResults.licenseType;
}

catch (Exception exp)
{
Label1.Text = exp.ToString();
}


}
private void querySample()
{
QueryResult qr = null;
binding.QueryOptionsValue = new sforce.QueryOptions();
binding.QueryOptionsValue.batchSize = 250;
binding.QueryOptionsValue.batchSizeSpecified = true;

qr = binding.query("select FirstName, LastName from Contact");

bool bContinue = true;
int loopCounter = 0;
while (bContinue)
{
Console.WriteLine("\nResults Set " + Convert.ToString(loopCounter++)
+ " - ");
//process the query results
for (int i=0;i {
sforce.sObject con = qr.records[i];
string fName = con.Any[0].InnerText;
string lName = con.Any[1].InnerText;
if (fName == null)
Console.WriteLine("Contact " + (i + 1) + ": " + lName);
else
Console.WriteLine("Contact " + (i + 1) + ": " + fName
+ " " + lName);
}
//handle the loop + 1 problem by checking the most recent queryResult
if (qr.done)
bContinue = false;
else
qr = binding.queryMore(qr.queryLocator);
}
Console.WriteLine("\nQuery succesfully executed.");
Console.Write("\nHit return to continue...");
Console.ReadLine();
}
}