0

We need to search for labor or warranties text from templates object. I tried this SOSL Query FIND {labor OR warranties} IN ALL FIELDS RETURNING Apttus__APTS_Template__c(Id,Name,Apttus__Mergefields__c)
but I am getting only few things like from few fields and apart from that we have that text(labor or warranties ) in content documents also but we are not getting that. Can you please help me in querying the text from the template object so that it would return from the content documents also.

1 Answers1

0

What do you get back with FIND {labor} IN ALL FIELDS RETURNING ContentVersion(Id, Title, ContentDocumentId). If it does return something promising you'd need to link it to your records (ContentDocumentLink table), perhaps few more queries to match it all up.

eyescream
  • 18,088
  • 2
  • 34
  • 46
  • It was returning all the content documents but we need only for single object, can you please help on it – Tejeswini T Feb 22 '22 at 06:15
  • You'll need to play with the WHERE clause for it or use 2nd query to filter out only the ones attached to your sobject. Files data model is funny, check https://stackoverflow.com/q/71214389/313628 out. Even https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_content.htm is not full picture, it focuses on Libraries/Workspaces, not linking to single records – eyescream Feb 22 '22 at 07:40