function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jonathan Wolff 7Jonathan Wolff 7 

Link record results to search component

Hello, I made a search component and I would like to lead to the record when I click on the field "Bezeichnung" which is an URL.

User-added image
Could you tell me how to change the controller so behind the url behind Bezeichnung leads to the record that was found in the suchleiste. For that purpose I add the Component too.


COMPONENT

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" controller="MediathekSearchController">
    
    <!-- handlers-->
    <aura:handler name="init" value="{!this}" action="{!c.init}"/>
    
    <!-- attributes -->
    <aura:attribute name="showSearchResults" type="Boolean" default="false"/>
    <aura:attribute name="searchKey" type="String"/>
    <aura:attribute name="mediathekList" type="List" default="Mediathek[]"/>
    <aura:attribute name="mediathekColumns" type="List"/>
    
    <div class= "slds-box">
        <div class="slds-grid slds-wrap" >
            <div class="slds-size_12-of-12">
        <lightning:layout multipleRows="true">
            <lightning:layoutItem  size="9">
                <lightning:input name="searchKey" placeholder="Enter search key" value="{!v.searchKey}"/>
            </lightning:layoutItem>
            <lightning:layoutItem  size="3">
                <lightning:button variant="brand" label="Search" title="Search" onclick="{!c.search}" class="customButton"/>
            </lightning:layoutItem>
        </lightning:layout>
    </div>
    </div>
    <div class="haha">
        <aura:if isTrue="{!v.showSearchResults}">
            <lightning:layout multipleRows="true">
                <lightning:layoutItem padding="around-small" size="8" >
                    <lightning:datatable keyField="id"
                                         data="{!v.mediathekList}"
                                         columns="{!v.mediathekColumns}"
                                         hideCheckboxColumn="true"/>
                </lightning:layoutItem>
            </lightning:layout>
        </aura:if>
    </div>
        </div>
    
    
    
</aura:component>
Hara SahooHara Sahoo
All credits to the original author.
Please find below an example:
https://www.infallibletechie.com/2018/07/how-to-hyperlink-record-in.html