1

I am trying to use the OOO Global search Results component with the custom Lightning component in Community(Using custom theme). The custom lightning component should take the input from user and show the related search records in the Global Search Results component. Anyone has idea how to implement this. I tried to match the design variable and populate the input tag with the user defined input but no luck. Much Appreciated.

enter image description here

8
  • When you search currently, are you getting no results back at all or an error? Permissions are used in the search so there are some nuances to configuring it. I would check out this Trailhead and see if that can help you solve this issue. If you run into a specific problem, you can post a question here about it. – nbrown Sep 24 '20 at 13:01
  • I am trying to use a custom lightning component with a search box(input field) and invoke the out of the box global search results component that salesforce community provides. We are not using any salesforce OOO theme but built a theme using an external JS library. I have used the same design parameters in the lightning component to match with the Global Search results component. – Aman Sep 24 '20 at 13:07
  • It looks like the user has visibility to Accounts and Aggregation records based on your screenshot. Are you able to find any of them when you search? Keep in mind sharing is going to play a big part in what is visible to a user here. It may be beneficial to share the code for your custom component too. I have not implemented a custom search component before, so I would not be able to give advice on that, but others might. – nbrown Sep 24 '20 at 13:18
  • The screenshot is from the preview of the community with authenticated user so sharing is not a issue. The component do not find any record as i cannot connect the Header component with the global search result(OOTB) component. The connection is missing and i do not find any documentation to connect or in some way invoke the Global search result component from the Header Lightning component to display the results. – Aman Sep 24 '20 at 13:22
  • 1
    I was able to figure this out. Every page in community has a specified URL. Just simply pass the parameter in the Page url having the same name as of the design attribute of Global search result component. ! – Aman Sep 24 '20 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.