Skip to main content
dragan loncar ha preguntado en #Integration
Hi

I am using integrafion salesforces with c⌗ .I established connection  salesforces with C  using WSDL

I want to update   last name  where firstname =d

please  help 

That  is my code  SOAP

String soqlQuery = "SELECT firstname__c,lastname__c FROM members__c where   firstname__c='d'";

            QueryResult qr = binding.query(soqlQuery);

in this record i want to update  lastname__c

PLEASE HELP 

 
2 respuestas
  1. 23 sept 2017, 12:01
    Hi,

    You need to create a web service class in salesforce and then generate a WSDL file and then make use of it in an external application. 

    Please go through the following link: https://trailhead.salesforce.com/modules/apex_integration_services/units/apex_integration_webservices

    If you would like to perform an update in apex then its as follows 

     

    global with sharing class MySOAPWebService

    {

    Webservice static members__c getRecord(String name)

    {

    // below code is for update

     

    list<members__c > Updatingrecords = new List<members__c >();

    for(members__c m : [select lastname from members__c where firstname__c =: name])

    {

    m.lastname = 'please specify a value for lastname here';

    Updatingrecords.add(m);

    }

    update Updatingrecords;

    }

    }

    Hope this helps 

    Please mark as best answer if the above helps ....!!!

     
0/9000