• apexdevSunil
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 4
    Replies

Hi

 

I am trying to execute the SOSL query with in Developer Edition of SalesForce.

This is my 3rd post still it is not answered.

 

Here is the code I am trying to execute

 

try

{

 

List<List<SObject>> searchList = [FIND 'Levis' IN NAME FIELDS RETURNING Opportunity(Amount, CloseDate, Name, OwnerId, StageName) LIMIT 1];

Opportunity[] records = (List<Opportunity>)searchList[0];

System.debug('@@@@@ In the test1SOSL.....'+records.size());

 

Opportunity opp = [select id from Opportunity where name = 'Levis' limit 1];System.debug('##### Opportunity ID is.....'+opp.id);

 

}catch (Exception ex) {

System.debug(ex);

}

 

I am able to execute the SOQL query but when executing the SOSL query I get the size of the List as 0.

 

please tell me why it is happening with SOSL and help me go forward

 

 

regards

Sunil

 

 

Hi

 

I am trying to execute  SOQL and SOSL querys from an Apex class.

When I run the querys for SOQL it gives the result but for SOSL it gives me a message SOSL query with resulting 0 rows in the Apex Debug Log.

 

When I run the same query using Force.com API from Java I am able to search for the opportunity and I got the values of the selecting columns as well.

 

Do I require any permissions to execute an SOSL query, please let me know.

 

Also please give me an Apex code sample which searches for an opportunity using SOSL

 

This is quite urgent please help me on this ASAP.

 

 

 

Hi

 

I have created an Opportunity whose name is 'myOpp' in my Developer Edition.

I am writing an SOSL query to search for an Opportunity 'myOpp' in the following way.

 

String searchquery='FIND \'myOpp\' IN ALL FIELDS RETURNING Opportunity(id,name,Amount WHERE name = \'myOpp\')';


List<List<SObject>> results = search.query(searchquery);


for(Integer j = 0;j<results.size();j++){ 
Opportunity[] opplist = (List<Opportunity>)results[j];
System.debug('@@@@@ Opp size is .....'+opplist.size());
}  

Even though I have the opportunity for which I make a search when I print the size of opplist I get 0.

 

Please correct my code and suggest me where I am wrong.

 

any help on this is greatly appreciated

 

 

sunil

Hi

 

I have wriiten an Apex class which makes use of Apex email services.

 

Iam sending an email with attachment to salesforce from xxx@gmail.com. My apex class will strip this attachment from the email and will insert the attachement into an opportunity

 

Now I want the functionality of sending emails with attachments from different email ids like yyy@gmail.com and zz@gmail.com and want to insert the attachments of the email in Opportunity

 

How can I add multiple email_Ids to my email service so that I can send email to salesForce from any email_Id I mention.

 

any help about this is greatly appreciated

 

 

sunil

 

 

Hi

 

Iam sending an email with attachment from Gmail to SalesForce

 

I want to develop an Apex class which retreives that Email and separate the attachment from that email

 

Any help or suggestion on this is greatly appreciated

 

 

 

Sunil 

 

 

 

Message Edited by apexdevSunil on 02-02-2009 01:32 AM

Hi

 

Iam using the Apex Email Services.

Iam sending the mail to salesforce from Gmail.

 

How can I retreive the body of the attachment of that email (InboundEmail)sent from gmail.

 

please clarify where the Inbound emails are stored in SalesForce.How they can be retreived?

 

 

any help about this is greatly appreciated.

 

 

Thanks

Sunil 

 

 

 

 

Hi

 

I have created an Opportunity whose name is 'myOpp' in my Developer Edition.

I am writing an SOSL query to search for an Opportunity 'myOpp' in the following way.

 

String searchquery='FIND \'myOpp\' IN ALL FIELDS RETURNING Opportunity(id,name,Amount WHERE name = \'myOpp\')';


List<List<SObject>> results = search.query(searchquery);


for(Integer j = 0;j<results.size();j++){ 
Opportunity[] opplist = (List<Opportunity>)results[j];
System.debug('@@@@@ Opp size is .....'+opplist.size());
}  

Even though I have the opportunity for which I make a search when I print the size of opplist I get 0.

 

Please correct my code and suggest me where I am wrong.

 

any help on this is greatly appreciated

 

 

sunil

Hi

 

Iam sending an email with attachment from Gmail to SalesForce

 

I want to develop an Apex class which retreives that Email and separate the attachment from that email

 

Any help or suggestion on this is greatly appreciated

 

 

 

Sunil 

 

 

 

Message Edited by apexdevSunil on 02-02-2009 01:32 AM