• Vimal Bhavsar 6
  • 0 Points
  • Member since 2014

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
  • 1
Hi team,

i m using Nugate Package Developerforce.com as a salesforce tools kit but it gives the erro like below while built the project

Error : 

The 'Microsoft.Bcl 1.1.8' package requires NuGet client version '2.8.1' or above, but the current NuGet version is '2.7.41115.310'.

The 'Microsoft.Bcl.Async 1.0.168' package requires NuGet client version '2.8.1' or above, but the current NuGet version is '2.7.41115.310'.

The 'Microsoft.Net.Http 2.2.20' package requires NuGet client version '2.8.1' or above, but the current NuGet version is '2.7.41115.310'.

MSB3073: The command ""C:\Users\2024\Desktop\Force.com-Toolkit-for-NET-master\Force.com-Toolkit-for-NET-master\samples\SimpleConsole\.nuget\NuGet.exe"

install "C:\Users\2024\Desktop\Force.com-Toolkit-for-NET-master\Force.com-Toolkit-for-NET-master\samples\SimpleConsole\packages.config" -source ""  -NonInteractive -RequireConsent -solutionDir "C:\Users\2024\Desktop\Force.com-Toolkit-for-NET-master\Force.com-Toolkit-for-NET-master\samples\SimpleConsole\ "" exited with code 1.

i have also update the Nugate.exe and also update all the tool kit,

can any one help me out for this ?

Hi Team,

I got the code for Update the Account/Contact Object data from the C# application with the help of Enterprise WSDL API from the Salesforce here my code :

binding.QueryOptionsValue = new QueryOptions();

        binding.QueryOptionsValue.batchSize = 250;

        binding.QueryOptionsValue.batchSizeSpecified = true;

        Account[] updates = new Account[2];

        Account account1 = new Account();
        account1.Id = "0019000000zSW2e";
        account1.ShippingPostalCode = "89044";
        updates[0] = account1;

        //Account account2 = new Account();
        //account2.Id = ids[1];
        //account2.NumberOfEmployees = 1000;
        //updates[1] = account2;

        // Invoke the update call and save the results
            SaveResult[] saveResults = binding.update(updates);
            foreach (SaveResult saveResult in saveResults)
                if (saveResult.success)
                    Console.WriteLine("Successfully updated Account ID: " +
                    // Handle the errors.
                    // We just print the first error out for sample purposes.
                    Error[] errors = saveResult.errors;
                    if (errors.Length > 0)
                        Console.WriteLine("Error: could not update " +
                              "Account ID " + saveResult.id + "."
                        Console.WriteLine("\tThe error reported was: (" +
                              errors[0].statusCode + ") " +
                              errors[0].message + "."
        catch (Exception e)
            Console.WriteLine("An unexpected error has occurred: " +
                                       e.Message + "\n" + e.StackTrace);



When i use the code for create the Account/Contact in salsforce i change littlebit this code and try to create but it's not working here is my that code

public void CreateAccountSample()
        Account account1 = new Account();
        Account account2 = new Account();

        // Set some fields on the account1 object. Name field is not set 

        // so this record should fail as it is a required field. 
        account1.Name = "Golden";
        account1.BillingCity = "Wichita";
        account1.BillingCountry = "US";
        account1.BillingState = "KA";
        account1.BillingStreet = "4322 Haystack Boulevard";
        account1.BillingPostalCode = "87901";

        // Set some fields on the account2 object 

        account2.Name = "Golden Straw";
        account2.BillingCity = "Oakland";
        account2.BillingCountry = "US";
        account2.BillingState = "CA";
        account2.BillingStreet = "666 Raiders Boulevard";
        account2.BillingPostalCode = "97502";

        // Create an array of SObjects to hold the accounts 

        WebReference.sObject[] accounts = new WebReference.sObject[2];
        // Add the accounts to the SObject array 

        accounts[0] = account1;
        accounts[1] = account2;

        // Invoke the create() call 

            WebReference.SaveResult[] saveResults = binding.create(accounts);

            // Handle the results 

            for (int i = 0; i < saveResults.Length; i++)
                // Determine whether create() succeeded or had errors 

                if (saveResults[i].success)
                    // No errors, so retrieve the Id created for this record 

                    Console.WriteLine("An Account was created with Id: {0}",
                    Console.WriteLine("Item {0} had an error updating", i);

                    // Handle the errors 

        catch (Exception e)
            // Console.WriteLine(e.Code);
            throw e;



Can any one plese help me for the same?  
Hi ,

I have one WSDL file Simply made by "Hello World " Example by default in MS Visual Studio, when i use this file to Generate from WSDL it will give error.
So wht i should keep in mind while creating the WSDL for using in to the salesforce ?

is there any specific way for this ?

Vimal Bhavsar
I want to get account name from this code all code is correct but i cant get classdb in my webservice can any one tell me that wht is classdb?

is it any apex class or what?

WebReference.SforceService service = new WebReference.SforceService();
        WebReference.LoginResult lr = service.login("vimal@annet.com", "Annet!2024Yvy54kpKT6eVTZEmLGuYEqSix");
        service.Url = lr.serverUrl;
        service.SessionHeaderValue = new WebReference.SessionHeader();
        service.SessionHeaderValue.sessionId = lr.sessionId;

String queryString = "Select Name from Account where Phone='1231231234'";
SqlDataReader dr = classdb.LoadReader(queryString) as SqlDataReader;

WebReference.Account nrProduct = new WebReference.Account();
        while (dr.Read())
            nrProduct.Name = dr[0].ToString();

Can i write my apex class like this ?

@future (callout=true)

WebService static string SendEmailNotification(string symbol)

Code of Logic
return String;


Actly i found that @future method can write with void but in my function i want to return string that can't be possible with VOID methos.
so can any one suggest me how can i do this ?


Can any one please tell me about this error?

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger avc_Test.Test caused an unexpected exception, contact your administrator: avc_Test.Test: execution of AfterInsert caused by: System.CalloutException: Callout from triggers are currently not supported.: Class.avc_Test.wwwWebservicexNet.StockQuoteSoap.GetQuote: line 31, column 1

<wsdl:definitions name="Service1" targetNamespace="http://tempuri.org/"><wsdl:types><xsd:schema targetNamespace="http://tempuri.org/Imports"><xsd:import schemaLocation="http://localhost/salseforce/Service1.svc?xsd=xsd0" namespace="http://tempuri.org/"/><xsd:import schemaLocation="http://localhost/salseforce/Service1.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/><xsd:import schemaLocation="http://localhost/salseforce/Service1.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/Salesforce1"/></xsd:schema></wsdl:types><wsdl:message name="IService1_GetData_InputMessage"><wsdl:part name="parameters" element="tns:GetData"/></wsdl:message><wsdl:message name="IService1_GetData_OutputMessage"><wsdl:part name="parameters" element="tns:GetDataResponse"/></wsdl:message><wsdl:message name="IService1_GetDataUsingDataContract_InputMessage"><wsdl:part name="parameters" element="tns:GetDataUsingDataContract"/></wsdl:message><wsdl:message name="IService1_GetDataUsingDataContract_OutputMessage"><wsdl:part name="parameters" element="tns:GetDataUsingDataContractResponse"/></wsdl:message><wsdl:portType name="IService1"><wsdl:operation name="GetData"><wsdl:input wsaw:Action="http://tempuri.org/IService1/GetData" message="tns:IService1_GetData_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataResponse" message="tns:IService1_GetData_OutputMessage"/></wsdl:operation><wsdl:operation name="GetDataUsingDataContract"><wsdl:input wsaw:Action="http://tempuri.org/IService1/GetDataUsingDataContract" message="tns:IService1_GetDataUsingDataContract_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataUsingDataContractResponse" message="tns:IService1_GetDataUsingDataContract_OutputMessage"/></wsdl:operation></wsdl:portType><wsdl:binding name="BasicHttpBinding_IService1" type="tns:IService1"><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="GetData"><soap:operation soapAction="http://tempuri.org/IService1/GetData" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="GetDataUsingDataContract"><soap:operation soapAction="http://tempuri.org/IService1/GetDataUsingDataContract" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="Service1"><wsdl:port name="BasicHttpBinding_IService1" binding="tns:BasicHttpBinding_IService1"><soap:address location="http://localhost/salseforce/Service1.svc"/></wsdl:port></wsdl:service></wsdl:definitions>
Getting this Error: Failed to parse wsdl: Found schema import from location http://localhost/salseforce/Service1.svc?xsd=xsd0. External schema import not supported

i tried to uplaod the WSDL generated by me but it gives me the error like this
can any one help me ?

Can any one tell me the sample code for how to call external webservice function in apex trigger.

I want to pass parameter to Function of that webservice and store in my sql database.


I want to do one functionality as below.

When i create any " New Account " to salesforce i want to insert that " Account Information " into the Account Table created  to my  SQL Server 2008 R2.

How can i develop this functionality ? can any one please suggest me easiest and simple way for the same.

I want to add one custom button on Account Create page and on that button i want to call one webservice by which i can add that account information data  in to external database/SQL database.

please advice for the same thnx

Can any one tell me the sample code for how to call external webservice function in apex trigger.

I want to pass parameter to Function of that webservice and store in my sql database.