• CloudDeveloper89
  • NEWBIE
  • 0 Points
  • Member since 2011

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

 

In webservice i am taking data from server and for this i am using soql  but Soql is returning only 250 records.

Is this a new limitation of SOQL?
and  what is the workaround for such a problem ?

Hi,

I am trying to fetch some Lead records from ORG1  and if some condition is satisfied create records in org2  from my current org.

 

I have credential of both ORGs .

 

list<Record> records = new list<Record>();

SFConnectionController controller = new SFConnectionController();

// First org from where I am fetching Lead records
LoginResult loginResult = controller.login(firstOrgUsername, firstOrgPassword, securityToken);
if(!loginResult.isError)
{
   Response response = controller.query('select Name from Lead, loginResult);

  records = response.data.records;

  if(/*somecondition*/)
 {
   // Second org where I want to insert record 
      LoginResult loginResultPublishingOrg = controller.login(secondOrgUserNmme, secondOrgPassword, securityToken);
   // here I want to insert record - I am not sure is it right syntax or not - Subscribe_User__c is object in second org
      Response response_insert = controller.query('Insert into Subscribe_User__c (User_Name__c)values ('Harshala')', loginResultPublishingOrg);
	
   /**** Getting error in response


 }
}

 

Received following error :

response_insert:Response:[data=Result:[fields={}, records=()], isError=true, message=Query Failed, result=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:MALFORMED_QUERY</faultcode><faultstring>MALFORMED_QUERY: unexpected token: Insert</faultstring><detail><sf:MalformedQueryFault xsi:type="sf:MalformedQueryFault"><sf:exceptionCode>MALFORMED_QUERY</sf:exceptionCode><sf:exceptionMessage>unexpected token: Insert</sf:exceptionMessage><sf:row>1</sf:row><sf:column>0</sf:column></sf:MalformedQueryFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>, status=Internal Server Error, statusCode=500]

 

Help me to insert record in ORG2... not getting where I am missing point. :(

 

Hi All,

 

We would like to scan a bar code and have it create a record in Salesforce on a custom object, as well as an activity record.  Has anyone had success doing this?

 

--David