I am connecting salesforce with salesforce using partner wsdl.I have been able to login to the destination org from the source org and then I am caling custom webservice and passing some parameters to it which will be mapped to the account object in the destination org and then record is inserted and inserted record id is returned as response .
I am running this code anonymously.
My problem is that after making callout ,called web service is returning an Id as reponse successfully .However,When I try to see inserted record in destination org I do not see any record over there.I am not getting any error
Below given code has custom web service.I have taken this webservice exactly as given in the salesforce help.
Can somebody please suggests
partnerSoapSforceCom.Soap sp = new partnerSoapSforceCom.Soap(); /
system.debug('The output after value has been returned by us is' + opp);
system.debug('The value of the vplan id is' + opp.planid);
}
catch(Exception e)
{
System.debug('The exception has been raised is'+e);
}
global class AccountPlan {
webservice String area; webservice String region;
//Define an object in apex that is exposed in apex web service global class Plan { webservice String name; webservice Integer planNumber; webservice Date planningPeriod; webservice Id planId; }
webservice static Plan createAccountPlan(Plan vPlan) {
//A plan maps to the Account object in salesforce.com. //So need to map the Plan class object to Account standard object Account acct = new Account(); acct.Name = vPlan.name; acct.AccountNumber = String.valueOf(vPlan.planNumber); insert acct;
it has been resolved.