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
Gaurav  PuranikGaurav Puranik 

Picklist field and lookup field is not displaying in salesforce lightning.

I have custom object expense__c and my Lightning namespace is LightningSF1. I want to create a page there I should display Expense object fields.
        There I have created one picklist field and one lookup field but that I don't know how to give those fields for that in component.

THIS IS MY COMPONENT CODE:-

<aura:component >
    <link href='/resource/Boot1' rel="stylesheet"/> 
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute name="newExpense" type="LightningSF1.Expense__c"
                    default="{ 'sobjectType': 'LightningSF1__Expense__c',
                             'Name': '',
                             'LightningSF1__Amount__c': 0,
                             'LightningSF1__Client__c': '',
                             'LightningSF1__Date__c': '',
                             'LightningSF1__Reimbursed__c': false
                             }"/>
    <div class="row " style="background-color:blue !important;">
        <div  style="text-align:center;font-weight:bold;color:white;">
            Outlet Information
        </div>
    </div>
    <br/>
    <div class="container">
        <div class="row" >
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4" >Expense Name</label>
                    <span class="col-sm-8">
                        <ui:inputText aura:id="expname"
                                      class="form-control"
                                      value="{!v.newExpense.Name}"
                                      placeholder="My Expense" required="true" />
                    </span>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4">Amount</label>
                    <span class="col-sm-8"> 
                        <ui:inputNumber aura:id="amount"
                                        class="form-control"
                                        value="{!v.newExpense.LightningSF1__Amount__c}"
                                        placeholder="20.80" required="true"/>
                    </span>
                </div>
            </div>
            
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4">Client</label>
                    <span class="col-sm-8">
                        <ui:inputText aura:id="client" 
                                      class="form-control"
                                      value="{!v.newExpense.LightningSF1__Client__c}"
                                      placeholder="ABC Co."/>
                    </span>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4">Expense Date</label >
                    <span class="col-sm-8">
                        <ui:inputDateTime aura:id="expdate" 
                                          class="form-control"
                                          value="{!v.newExpense.LightningSF1__Date__c}"/>
                    </span>
                </div>
            </div>
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4">Country</label>
                    <span class="col-sm-8">
                        <ui:outputText aura:id="country" 
                                      class="form-control"
                                      value="{!v.newExpense.LightningSF1__Country__c}"/>
                    </span>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4">Types</label >
                    <span class="col-sm-8">
                      <!-- <aura:attribute name="Name" type="String" /> -->
                    </span>
                </div>
            </div>
        </div>
    </div>
   <div class="col-sm-12">
       <span class="col-sm-6">
    <ui:button label="Submit" press="{!c.createExpense}"/>
       </span>
 <span class="col-sm-6">
     <ui:button label="Cancel" press="{!c.createExpense}"/>
       </span>
    </div>
</aura:component>

Here country is loookup field I want to show on page but fieldset tag
<ui:____for lookup I don't know like we know that tag for inout field is <ui:inputText> same way can anyone tell me tag for Lookup and picklist field...
RishavRishav
Hii Gaurav,
Currently there is not any 'Standard UI component  in lightning that will support you to create lookup in lightning component.
 No support for lookup component in lightning as we have in Visualforce page. 

similarly picklist component is also not available as it is in visualforce page. 

For both things you'll have to create your own solution. 

Thanks 
Rishav
sfdcsushilsfdcsushil
Hi,

Do you know if support has been added for picklist and Lookups by Salesforce in any recent release?

Thanks,
Sushil