A Salesforce Lightning input field that adds a Lookup-field to any SObject in Salesforce
Dependencies: Must deploy ApexMocks and ApexCommons before deploying this library
Please do not forget to make a donation when you find this tool useful. Much appreciated!
This code is originally written by Enrico Murru (http://enree.co, @enreeco), but I found that it needed some external dependencies, while this component is 100% based on Salesforce Lightning.
This example will display an input field of a lookup type to the User SObject, and will filter on only active users with a Salesforce license.
<aura:attribute access="private" name="userId" type="String" default=""/>
<div class="slds-form-element">
<div class="slds-form-element__control">
<label class="slds-form-element__label">Select User:</label>
<c:sflib_InputLookup type="User" value="{!v.userId}" filter="isActive=true AND Profile.UserLicense.Name='Salesforce'" />
</div>
</div>