0

I have used the SOQL to get the salesforce record.

 sforce.SforceService SFDCSer;
 qr = SFDCSer.query('select id,name from account');
 sforce.sObject[] queryresutls = qr.records;
 List<sforce.sObject> recordList = queryresutls.OfType<sforce.sObject>().ToList();

I don't know how to use the SOSL in C#. I cant find the Search.Query keyword.

  • 1
    Please don't edit questions when you have a new question, especially when you already have an answer. Please create a new question using the 'Ask Question' button in the top right corner. PS. You can get the text of your new question from the revision history of this one. – Alex Tennant Aug 6 '14 at 9:45
  • I've locked this to prevent more edits ... Lemon, as @AlexTennant says you should post follow up questions as new questions so that the context for the accepted answer isn't changed. You'll also get more rep that way! – Matt Lacey Aug 7 '14 at 3:44
1

You can get the record by using below the code.

 sforce.SearchResult sr = SFDCService.search("FIND {tt*} IN ALL FIELDS RETURNING Account (Id,Name,type),Contact(name,email),Opportunity(name,StageName)");
sforce.SearchRecord[] sRecords = sr.searchRecords;
List<sforce.SearchRecord> recordList = sRecords.OfType<sforc

e.SearchRecord>().ToList();
| improve this answer | |
1

There is a search() method in the binding. It's impossible not to be there!

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_search.htm

| improve this answer | |
  • Yes I have tried like below but I dont know how to load to datagridview. sforce.SearchResult sr = SFDCService.search("FIND {tt*} IN ALL FIELDS RETURNING Account (Id,Name,type),Contact(name,email),Opportunity(name,StageName)"); sforce.SearchRecord[] sRecords = sr.searchRecords; – Lemon Aug 6 '14 at 9:14
  • How to get the object name from the search result and add to the griddateview like id, object name, fields – Lemon Aug 6 '14 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.