• Claudio Ungaro 5
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
Good afternoon,
I have tried to use the code above but i receive this error:
e.Message = "There was an error in serializing one of the headers in message loginRequest: 'Unable to generate a temporary class (result=1).\r\nerror CS0030: Cannot convert type 'SF_Connector1.SoapApi.ListViewRecordColumn[]' to 'SF_Connector1.SoapApi.ListViewRecordColu... etc.
Googling around i found some answers to that "generic" error saying there is an dimensional array mismatch, but i have been unable to apply the suggested corrections.
I reduced the code to the very minimal section oflogin but the bug appears into the line

lr = ss.login(Nothing, "hello@hello.com.au", "Yourpassword" & "Security Token")

Of course i replaced the variable with my own login data.
Anyone can help?
This is the very last part i have to implement in my procedure and begin to be very frustrated for the impossibility to do it.
Thank you in advance.
PS, i am using VS2015, vb.net,  net framework 3.5
Claudio
Good afternoon,
I have tried to use the code above but i receive this error:
e.Message = "There was an error in serializing one of the headers in message loginRequest: 'Unable to generate a temporary class (result=1).\r\nerror CS0030: Cannot convert type 'SF_Connector1.SoapApi.ListViewRecordColumn[]' to 'SF_Connector1.SoapApi.ListViewRecordColu... etc.
Googling around i found some answers to that "generic" error saying there is an dimensional array mismatch, but i have been unable to apply the suggested corrections.
I reduced the code to the very minimal section oflogin but the bug appears into the line

lr = ss.login(Nothing, "hello@hello.com.au", "Yourpassword" & "Security Token")

Of course i replaced the variable with my own login data.
Anyone can help?
This is the very last part i have to implement in my procedure and begin to be very frustrated for the impossibility to do it.
Thank you in advance.
PS, i am using VS2015, vb.net,  net framework 3.5
Claudio
Good afternoon,
I have tried to use the code above but i receive this error:
e.Message = "There was an error in serializing one of the headers in message loginRequest: 'Unable to generate a temporary class (result=1).\r\nerror CS0030: Cannot convert type 'SF_Connector1.SoapApi.ListViewRecordColumn[]' to 'SF_Connector1.SoapApi.ListViewRecordColu... etc.
Googling around i found some answers to that "generic" error saying there is an dimensional array mismatch, but i have been unable to apply the suggested corrections.
I reduced the code to the very minimal section oflogin but the bug appears into the line

lr = ss.login(Nothing, "hello@hello.com.au", "Yourpassword" & "Security Token")

Of course i replaced the variable with my own login data.
Anyone can help?
This is the very last part i have to implement in my procedure and begin to be very frustrated for the impossibility to do it.
Thank you in advance.
PS, i am using VS2015, vb.net,  net framework 3.5
Claudio

Hi,

 

I am getting below exception while getting the opportunity objects from my account.

"UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService"

 

While login  i am setting the one url and once its done i am setting one more URL.

 

Before login

//if debug_mode use the following service urlif(isSalesForceDebugModeEnabled)

binding.Url =

"https://cs3-api.salesforce.com/services/Soap/c/22.0/00DQ0000000HABh";

 

After login

 

binding.Url = loginResult.serverUrl;

 

This is my login function.

privatestaticbool SalesForceLogin(SforceServicebinding)

{

LoginResult loginResult = null;

 

GetUserInfoResult userInfo = null;

 

// Time out after a minute

binding.Timeout = 60000;

// Try to log in the usertry

{

string username = username@uname.com;

 

string password = "password";

loginResult = binding.login(username, password);

}

catch (System.Web.Services.Protocols.SoapException)

{

// This is likley to be caused by bad username or password//AppError.AddError("SalesForce Login [Soap Exception]: " + e.Message, AppError.AudienceEnum.TechnicalTeam, AppError.LevelEnum.Exception);returnfalse;

}

catch (Exception)

{

// This is something else, probably comminication//AppError.AddError("SalesForce Login [Other Error]: " + e.Message, AppError.AudienceEnum.TechnicalTeam, AppError.LevelEnum.Exception);returnfalse;

}

//Create a new session header object and set the session id to that returned by the login

binding.SessionHeaderValue =

newSessionHeader();

binding.SessionHeaderValue.sessionId = loginResult.sessionId;

userInfo = loginResult.userInfo;

//Change the binding to the new endpoint

binding.Url = loginResult.serverUrl;

returntrue;

}

 

While getting the opportunities it is raising the exception

 

publicvoidQueryOpportunity()

{

QueryResult qr = null;

binding.QueryOptionsValue =

newQueryOptions();

binding.QueryOptionsValue.batchSize = 250;

binding.QueryOptionsValue.batchSizeSpecified =

true;

 

DescribeSObjectResult result = binding.describeSObject("Opportunity");

 

boolcanCreate = result.createable;

 

foreach(Field f inresult.fields)

{

lstProductInfo.Items.Add(f.name);

}

qr = binding.query(

"select Name,Web_Order_Number__c,CloseDate,StageName,Tax_Amount__cSpecified,Promo_Code_Discount_Amount__cSpecified from Opportunity");

 

// qr = binding.query("select ID, Name, ProductCode, Description from Product2");

 

 

grdProducts.DataSource = qr.records;

grdProducts.DataBind(); 

 

}

 In describeresult object i am getting exception.What is the problem i could nt able to understand,

Note:I am new bie of salesforce.I dont know anything abt SF.Why they are setting 2 urls,who will give those urls,Is there any proper document .I have searched in net but full high teminology.I could nt able to understand.

Please provide me answer for above prob and Doc for SF

 

-Sandhya

I have searched the API docs and discussion boards and have not found any info about how to get to the SforceService or where it comes from, so I am starting a new post for this.

 

I am using VS2008, but target the .NET Compact Framework 2.0 for a CE 5.0 device. I generated a Partner WSDL (Which includes the SforceService endpoint def.). In VS2008, I added a Web Reference (not a WCF Service Reference!) and found the service description using the URL:

https://login.salesforce.com/?ec=302&startURL=%2Fservices%2Fwsdl%2Fclass%2FserviceName

(which looked successful).

 

I get the correct namespace added to my project with the proxy class for the service. When I try to set up the SOAP binding, I have no access to SforceService and cannot see it in the Object Browser. Is there something (i.e., an SDK) that I need to install to get this, or should it show up automatically from the service description while adding the Web Reference?

 

Please help! TIA, Dave