• Pooja9426
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi All,
I am trying to get all the records owned by a user. I trying below SOSL query.
List<String> listOfObjects = new List<String>();
listOfObjects.add('Account'+'(id,OwnerId where OwnerId = '+userId+')')
listOfObjects.add('Candidate__c'+'(id,OwnerId where OwnerId = '+userId+')')
FIND {Username} IN ALL FIELDS RETURNING listOfObjects

but this query is returning no records. Please help me with this.

Thanks in advance
Hi All,
I am trying to get all the records owned by a user. I trying below SOSL query.
List<String> listOfObjects = new List<String>();
listOfObjects.add('Account'+'(id,OwnerId where OwnerId = '+userId+')')
listOfObjects.add('Candidate__c'+'(id,OwnerId where OwnerId = '+userId+')')
FIND {Username} IN ALL FIELDS RETURNING listOfObjects

but this query is returning no records. Please help me with this.

Thanks in advance
Hi All,

I would like to query all SObject recrods owned by specific user, can you please guide me how can we do that?

My requirement:
We would like to deactivate the more Users in our org, hence instead of transfering the records for each user manually, require to implement through apex that all records will transfer from one User  to another on button click. any alternative suggestion would be appriciated..

Thanks
Sivasankar.