• amarnijer
  • NEWBIE
  • 55 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 15
    Replies

Hi I have 2 SOQL queries, both are used for search.

 

First query is working fine, i.e.

 

select FirstName,LastName,Title,Street,Company,LeadSource,Email,Owner.Name,Rating FROM Lead where Createddate < LAST_WEEK AND
Status = 'Open' AND (Rating ='Hot (Probably Order)' OR RecordTypeId IN
('012800000007S5iAAE','012800000007IumAAE','01280000000LmL3AAK','012800000007TxvAAE')) and (FirstName like 'Kevin(%'or LastName
like 'Kevin(%'or Company like 'Kevin(%'or LeadSource like 'Kevin(%'or Email like 'Kevin(%'or Owner.Name like 'Kevin(%'or Rating
like 'Kevin(%'or Street like 'Kevin(%'or Title like 'Kevin(%') order by FirstName asc NULLS FIRST

 

Second one is giving error like "Invalid character found in the filter value "Kevin(%" used with the "like" operator."

the second query is below

 

select FirstName,LastName,Title,Street,Company,LeadSource,Email,Owner.Name,Rating FROM Lead where Createddate < LAST_WEEK AND
Status = 'Open' and (FirstName like 'Kevin(%'or LastName like 'Kevin(%'or Company like 'Kevin(%'or LeadSource like 'Kevin(%'or
Email like 'Kevin(%'or Owner.Name like 'Kevin(%'or Rating like 'Kevin(%'or Street like 'Kevin(%'or Title like 'Kevin(%') order
by FirstName asc NULLS FIRST

 

Can any one help me to find out the error?

Thanks in advance.

I am trying to search duplicate records for a custom Object. I used "Soundex algorithm" for that, but it is not that much effective. So I want to do a search based on "Metaphone" algorithm. Can anyone help me to write a code for this algorithm in apex. I got a link http://arungaikwad.wordpress.com/2013/02/13/phonetic-search-in-salesforce-com/ but it does not help me.

 

Thanks in advance.

Hi, I want to get Account Owner name from Opportunity.

I have written a soql like below

Select o.Account.Owner.LastName From Opportunity o . then I run it in eclipse.

it is giving a list of blank account.

 

I want to get it in a single query.

 

Thanks

Hi I have written a soql query like below.

 

SELECT ID,Name,
Dodge_Report_Number__c,Project_Name__c,Bid_Date__c,GC_Awarded__c,Action_Stage__c,Target_Start_Date__c,Project_Valuation_High__c,Pro
ject_Valuation_Low__c,Type_Of_Work__c,Removed_By__r.Name, Removed_By__r.LastName
,Removed_By__r.FirstName,Reason_Removed_Comments__c,Reason_Why_Project_Removed__c,Branch_ID__c FROM Dodge_Project__c WHERE
Branch_ID__c != null AND CreatedDate >= LAST_QUARTER AND CreatedDate <= THIS_QUARTER AND Job_Profile_Status__c NOT IN
('Created','Removed') AND Branch_ID__c IN('101','102','909','903','941','994','217','904') AND (Action_Stage__c IN
('Start','Construction') OR GC_Awarded__c = TRUE) and (Name like 'P@#$&(%' or Dodge_Report_Number__c like 'P@#$&(%' or
Project_Name__c like 'P@#$&(%' or Action_Stage__c like 'P@#$&(%' or Type_Of_Work__c like 'P@#$&(%' or Removed_By__r.Name like 'P@#
$&(%' or Reason_Why_Project_Removed__c like 'P@#$&(%' or Branch_ID__c like 'P@#$&(%') order by Name asc NULLS FIRST

 

 

this does not search a records with name "P@#$&(intos)". It is giving eror like "Invalid character found in the filter value "P@#$&(%" used with the "like" operator".

 

 

 

I Tried with "like 'P@#$&\\(%'" . here no error but the record is not displayed.

then I tried with "like 'P@#$&\(%'". here I got error like "Invalid character found in the filter value "P@#$&(%" used with the "like" operator".

 

Please help me to silve the issue.

Hi

In OWD Lead is Private and Role hierarchy is checked. I need to get all lead records for a user where the lead data are shared to a top label role and its subordinates of that user. for example some user "X" shared data with "A and  its Subordinates". Now C reports to B, B reports to A. How A can see all records of B (What B can view). I Need to do this using Apex. Please some one give some solution.

 

Thanks.

Hi,

I have a role hierarchy like "C" reports to "B' and "B" reports To "A". In OWD Lead Object Is Private, role hierarchy is checked.   Now Some other user "X" has shared all his leads to "A`s role and subordinates". Now When "A" logs in he can see a Custom Tree  of all his Subordinates. when "A" select "C" from tree, all the Lead records that "C" can view should display in a table (below the roll tree). I am able to get UserId of "C" when "A" clicks on the tree, but How can I get C`s lead records using its Id?  I am able to get all records where "C" is the Owner. But In Lead share the records share with A and A`s Subordinates. Please give me some solution.

Hi,

I have a Visualforce page. When I include a Component in it,  header tabs are displaying in a single line, which causes the page very wide. I am able to do all Functionalities of the component correctly. I am not getting any Js conflict issue or CSS conflict issue in the Console of the browsers. It is same for all browser (IE, Chrome, Mozila). What is the issue?

Thanks. 

I have a home page component at left side which shows a tree view of a logged in user and his subordinates. When User choose some users from the tree using checkbox and click a button below, I can get the Ids of all selected user. In the right side of the page I have a Custom Visualforce Page, I want to pass the Selected User Ids to the page having in right side. I am doing it wsing Javascript (top.window.location.href = "{!newUrl}"). But when The {!newUrl} string too big then the right side page not loaded. Showing blank page. How can I pass the {!newUrl} val to the right side page.

 

NOTE: {!newUrl} is the url of the right side Visualforce page with Selected Id as querystring. I want to refresh the right side page according to the selected user Id values.

 

Thanks.

Hi, I want to create a tree view with checkbox option based on the logged in user. When the user logged in , he can see a tree  with him as a root nodes and his subordinates as sub nodes. Then he can chose any user and the user`s Id should be display in bottom. I got a code from the link below

 

http://forceguru.blogspot.in/2011/12/displaying-role-hierarchy-on.html

 

But this returns me a tree from the beginning, not as logged in user.

Thanks.

Hi, I have a code like below

list<Lead> lstLead = [select Id, Name from Lead];  //line 8

system.dedug('----size---'+lstLead.size()) ;  // line 9

 

In debug log

============

 

Line 8: returns 16120 Rows.

Line 9: debug prints==>    ----size---16074

 

How this is possible? Can anyone help me?

 

Thanks.

 

I am using metadata api to fetch all listviews. I can get it via listMetadata() call. I am not geting filter criterias for listview in the response XML. I am getting name of listViesw. Can any one tell me how to get filter criterias of a list view? or is there any way to get filters using the listview name which i got via listMetadata() call? Actually I want to get all records of any listview.

 

HI,

How to integrate MLS Feeds using REST in a visualforce page

Thanks,

Hi I have 2 SOQL queries, both are used for search.

 

First query is working fine, i.e.

 

select FirstName,LastName,Title,Street,Company,LeadSource,Email,Owner.Name,Rating FROM Lead where Createddate < LAST_WEEK AND
Status = 'Open' AND (Rating ='Hot (Probably Order)' OR RecordTypeId IN
('012800000007S5iAAE','012800000007IumAAE','01280000000LmL3AAK','012800000007TxvAAE')) and (FirstName like 'Kevin(%'or LastName
like 'Kevin(%'or Company like 'Kevin(%'or LeadSource like 'Kevin(%'or Email like 'Kevin(%'or Owner.Name like 'Kevin(%'or Rating
like 'Kevin(%'or Street like 'Kevin(%'or Title like 'Kevin(%') order by FirstName asc NULLS FIRST

 

Second one is giving error like "Invalid character found in the filter value "Kevin(%" used with the "like" operator."

the second query is below

 

select FirstName,LastName,Title,Street,Company,LeadSource,Email,Owner.Name,Rating FROM Lead where Createddate < LAST_WEEK AND
Status = 'Open' and (FirstName like 'Kevin(%'or LastName like 'Kevin(%'or Company like 'Kevin(%'or LeadSource like 'Kevin(%'or
Email like 'Kevin(%'or Owner.Name like 'Kevin(%'or Rating like 'Kevin(%'or Street like 'Kevin(%'or Title like 'Kevin(%') order
by FirstName asc NULLS FIRST

 

Can any one help me to find out the error?

Thanks in advance.

I am trying to search duplicate records for a custom Object. I used "Soundex algorithm" for that, but it is not that much effective. So I want to do a search based on "Metaphone" algorithm. Can anyone help me to write a code for this algorithm in apex. I got a link http://arungaikwad.wordpress.com/2013/02/13/phonetic-search-in-salesforce-com/ but it does not help me.

 

Thanks in advance.

Hi, I want to get Account Owner name from Opportunity.

I have written a soql like below

Select o.Account.Owner.LastName From Opportunity o . then I run it in eclipse.

it is giving a list of blank account.

 

I want to get it in a single query.

 

Thanks

Hi I have written a soql query like below.

 

SELECT ID,Name,
Dodge_Report_Number__c,Project_Name__c,Bid_Date__c,GC_Awarded__c,Action_Stage__c,Target_Start_Date__c,Project_Valuation_High__c,Pro
ject_Valuation_Low__c,Type_Of_Work__c,Removed_By__r.Name, Removed_By__r.LastName
,Removed_By__r.FirstName,Reason_Removed_Comments__c,Reason_Why_Project_Removed__c,Branch_ID__c FROM Dodge_Project__c WHERE
Branch_ID__c != null AND CreatedDate >= LAST_QUARTER AND CreatedDate <= THIS_QUARTER AND Job_Profile_Status__c NOT IN
('Created','Removed') AND Branch_ID__c IN('101','102','909','903','941','994','217','904') AND (Action_Stage__c IN
('Start','Construction') OR GC_Awarded__c = TRUE) and (Name like 'P@#$&(%' or Dodge_Report_Number__c like 'P@#$&(%' or
Project_Name__c like 'P@#$&(%' or Action_Stage__c like 'P@#$&(%' or Type_Of_Work__c like 'P@#$&(%' or Removed_By__r.Name like 'P@#
$&(%' or Reason_Why_Project_Removed__c like 'P@#$&(%' or Branch_ID__c like 'P@#$&(%') order by Name asc NULLS FIRST

 

 

this does not search a records with name "P@#$&(intos)". It is giving eror like "Invalid character found in the filter value "P@#$&(%" used with the "like" operator".

 

 

 

I Tried with "like 'P@#$&\\(%'" . here no error but the record is not displayed.

then I tried with "like 'P@#$&\(%'". here I got error like "Invalid character found in the filter value "P@#$&(%" used with the "like" operator".

 

Please help me to silve the issue.

Hi, I want to create a tree view with checkbox option based on the logged in user. When the user logged in , he can see a tree  with him as a root nodes and his subordinates as sub nodes. Then he can chose any user and the user`s Id should be display in bottom. I got a code from the link below

 

http://forceguru.blogspot.in/2011/12/displaying-role-hierarchy-on.html

 

But this returns me a tree from the beginning, not as logged in user.

Thanks.

Hi, I have a code like below

list<Lead> lstLead = [select Id, Name from Lead];  //line 8

system.dedug('----size---'+lstLead.size()) ;  // line 9

 

In debug log

============

 

Line 8: returns 16120 Rows.

Line 9: debug prints==>    ----size---16074

 

How this is possible? Can anyone help me?

 

Thanks.

 

I am using metadata api to fetch all listviews. I can get it via listMetadata() call. I am not geting filter criterias for listview in the response XML. I am getting name of listViesw. Can any one tell me how to get filter criterias of a list view? or is there any way to get filters using the listview name which i got via listMetadata() call? Actually I want to get all records of any listview.

 

HI,

How to integrate MLS Feeds using REST in a visualforce page

Thanks,