• Patxi
  • NEWBIE
  • 25 Points
  • Member since 2009

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

Hi all,

 

I have an issue with convertLead() call. SF keeps returning the same error message once and again : «Specified Contact must be parented by specified Account» whilst I am pretty sure the contact specified is asociated with specified account.

 

The account I specify is business so the rule in APEX API documentation «If you are converting a lead into a person account, do not specify the contactId or an error will result. Specify only the accountId of the person account» does not apply.

 

This is my code:

 

Contact oldestContact = getOldestContact(oldestContactsSOSL));
Lead oldestLead = getOldestLead(leadsEnSF));
LeadConvert lc = new LeadConvert();
lc.leadId = oldestLead.Id;
lc.contactId = oldestContact.Id;
lc.accountId = oldestContact.AccountId;                       
lc.ownerId = oldestContact.Account.OwnerId;
lc.convertedStatus = "Converted";
lc.doNotCreateOpportunity = true;                       
lc.overwriteLeadSource = true;
lc.sendNotificationEmail = true;

LeadConvertResult[] lcr = SalesforceController.instancia.convertLeads(new LeadConvert[] { lc });

if (lcr[0].success)
{
    ...
}
else
{
    ...
}

 

Any comment would be really appreciated. Thanks in advance.

  • November 10, 2009
  • Like
  • 0

I get the error after I start uploading a file.

 

By checking the connection with Salesforce server, I see that almost every connection will send out about 190~210kb data, and then it will stop. After the timeout time, the connection disappears and the error codes below are given.

 

I have been able to upload the file about 1 one week ago. And then since April 7, I found I could not upload. If I try to upload the file for a few times, I cannot log in at all, but that will be unlock in about 20 min.

 

I also try uploading from my account page, it sometimes gives me some timeout errors too. Are there any problems with your server? Or you change some file limit on the developer accounts.

 

I am in UK, does it matter where I am located?

 

My app needs to upload the files to document, the size of the files are usually between 300kb and 3mb.

 

Any help will be appreciated! Thanks

 

 

 

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host
。. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
。

   at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags)

   at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)

   --- End of inner exception stack trace ---

   at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)

   at System.Net.Security._SslStream.StartWriting(SplitWritesState splitWrite, SplitWriteAsyncProtocolRequest asyncRequest)

   at System.Net.Security._SslStream.ProcessWrite(BufferOffsetSize[] buffers, SplitWriteAsyncProtocolRequest asyncRequest)

   at System.Net.TlsStream.MultipleWrite(BufferOffsetSize[] buffers)

   at System.Net.Connection.Write(ScatterGatherBuffers writeBuffer)

   at System.Net.ConnectStream.ResubmitWrite(ConnectStream oldStream, Boolean suppressWrite)

   --- End of inner exception stack trace ---

   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)

   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)

   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

 

 

Hi all,

 

I have an issue with convertLead() call. SF keeps returning the same error message once and again : «Specified Contact must be parented by specified Account» whilst I am pretty sure the contact specified is asociated with specified account.

 

The account I specify is business so the rule in APEX API documentation «If you are converting a lead into a person account, do not specify the contactId or an error will result. Specify only the accountId of the person account» does not apply.

 

This is my code:

 

Contact oldestContact = getOldestContact(oldestContactsSOSL));
Lead oldestLead = getOldestLead(leadsEnSF));
LeadConvert lc = new LeadConvert();
lc.leadId = oldestLead.Id;
lc.contactId = oldestContact.Id;
lc.accountId = oldestContact.AccountId;                       
lc.ownerId = oldestContact.Account.OwnerId;
lc.convertedStatus = "Converted";
lc.doNotCreateOpportunity = true;                       
lc.overwriteLeadSource = true;
lc.sendNotificationEmail = true;

LeadConvertResult[] lcr = SalesforceController.instancia.convertLeads(new LeadConvert[] { lc });

if (lcr[0].success)
{
    ...
}
else
{
    ...
}

 

Any comment would be really appreciated. Thanks in advance.

  • November 10, 2009
  • Like
  • 0