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.

2
  • 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. Commented Aug 6, 2014 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
    Commented Aug 7, 2014 at 3:44

2 Answers 2

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();
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

2
  • 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
    Commented Aug 6, 2014 at 9:14
  • How to get the object name from the search result and add to the griddateview like id, object name, fields
    – Lemon
    Commented Aug 6, 2014 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .