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
Mahesh Babu 49Mahesh Babu 49 

Lightning lookup component

I want to show the lookup field in lightning page. plaese any one knows reply to this post.
using this below component to create fields in lightning page. please any one knows modify the partner group and account filed as lookup. please find the below code modify it.
<aura:component implements="force:appHostable">
    
    <ltng:require styles="/resource/bootstrap"/>
    <aura:attribute name="Recipient" type="Recipient__c[]"/>
        <aura:attribute name="newARecipient" type="Recipient__c"
             default="{ 'sobjectType': 'Recipient__c',
                         'Name': '',
                         'Account__c': '',
                           'Actor_Type__c':'',
                           'Partner_Group__c':'',
                           'Request__c':''
                       }"/>

   <div class="bootstrap-sf1" >
    <div class="container">
        <div class="row" >
            
                <div class="col-sm-6">
                    <label class="col-sm-4" >Recipient Name</label>
                    <span class="col-sm-8">
         
                    
                
                    <ui:inputText aura:id="recipientName" 
                                  class="form-control" 
                                  value="{!v.newARecipient.Name}"
                                  placeholder="Recipient Name"/>
</span>
</div>
            </div>
<div class="row" >
           
                <div class="col-sm-6">
                    <label class="col-sm-4" >Request</label>
                    <span class="col-sm-8">
         
                    <!-- If you registered a namespace, the attribute values must include your namespace -->
                    <!-- For example, value="{!v.newExpense.myNamespace__Amount__c}" -->
                    <ui:inputText aura:id="request" 
                                    class="form-control"
                                    value="{!v.newARecipient.Request__c}"
                                    placeholder="Request" />
        
                    </span>
                </div>
    </div>
        <div class="row" >
           
                <div class="col-sm-6">
                    <label class="col-sm-4" >Actor Type</label>
                    <span class="col-sm-8">
                    <ui:inputSelect aura:id="actortype" >
                        <aura:iteration items="{!v.Recipient__c}" var="recipient">
                            <ui:inputSelectOption text="{!recipient.Id}" label="{!recipient.Actor_Type__c}" />
                        
                        </aura:iteration>
                        <ui:inputSelectOption text="select Actor"/>
                        <ui:inputSelectOption text="Requestor"/>
                        <ui:inputSelectOption text="Responder"/>
                    </ui:inputSelect>
                    </span>
                </div>
            </div>
            <div class="row" >
            
                <div class="col-sm-6">
                    <label class="col-sm-4" >Partner Group</label>
                    <span class="col-sm-5">
                    
                    <ui:inputSelect aura:id="partnergroup"  change="{!c.onSelectChange}">
                        <aura:iteration items="{!v.Recipient__c}" var="recipient">
                            <ui:inputSelectOption text="{!recipient.Id}" label="{!recipient.Partner_Group__c}" />
                        </aura:iteration>
                        <ui:inputSelectOption text="Requestor"/>
                    </ui:inputSelect>
                    </span>
                </div>
                </div>
                <div class="row" >
            
                <div class="col-sm-6">
                    <label class="col-sm-4" >Account</label>
                    <span class="col-sm-8">    
                    <ui:inputSelect aura:id="account" change="{!c.onSelectChange}">
                        <aura:iteration items="{!v.Recipient__c}" var="recipient">
                            <ui:inputSelectOption text="{!recipient.Id}" label="{!recipient.Account__c}" />
                        
                        </aura:iteration>
                    <ui:inputSelectOption text="Requestor"/>
                    </ui:inputSelect>
                    </span>
                </div>
                    </div>
         <div class="row " >
        <div  style="text-align:center;font-weight:bold;color:Black;">
             <div class="col-sm-6">
       <span class="col-sm-1">
                    <ui:button label="Save" press="{!c.createRecord}" />
            </span>
            <span class="col-sm-1">
                    <ui:button label="cancel" press="{!c.cancel}"/>
            </span>     
            <span class="col-sm-1">
                <ui:button label="save and new" press="{!c.saveAndNew}"/>
            </span>
            </div>
            
             </div>
        </div>
       </div>
        
        </div>
</aura:component>
TonyScottTonyScott
There isn't a standard lookup component in lightning as you would expect. I've written a Lightning component to provide lookup functionality in my blog article here: http://meltedwires.com/2015/10/31/salesforce-lightning-lookup-component-v2/

Another implementation of a lightning lookup by Enrico Murru Blah can be found here: https://developer.salesforce.com/blogs/developer-relations/2015/06/salesforce-lightning-inputlookup-missing-component.html 
Bhuvan PashamBhuvan Pasham
Hi @TonyScott - Thank you for the code posted on github. It is a very helpful contribution. It works perfectly on a standalone app.
I tried to use it on Recod home page (as part of another component) and the list is NOT rendering. HTML is being composed perfectly - but the list part just does NOT come into foreground. Any help is greatly appreciated.