Lightning allows us to create convenient, feature-rich components, however, the problem is that there is not all the functionality from classic Salesforce that is currently implemented. This leads to more time-consuming and expensive component development process.
For example if you want to include Lookup Field in your custom Lightning Component you have two solutions:
- You may spend your precious time for the researching, writing and testing your own Custom component for Lookup.
- Use our helpful solution
We have created the “Lightning Universal Lookup Component” that will save your time when you want add lookup field on your custom component. Now you do not need to lost time on creating and testing own component for lookup. Just use it.
We use Lightning design System, so component is look and work like standard Lightning Lookup field. Our component is easy to customize and implement. You could use it for custom and standard objects. Also it work in Salesforce1.
We have managed and unmanaged package versions.
In order to implement our solution you will have to:
- Add Lookup component in your lightning component or application
- Create a variable for selected Id
- Add two following attributes in a component CustomLookupField:
- objectType — API name of Salesforce Object. Could be Standard or Customized.
- selectedRecordId — variable that will contain Id of selected record.
4. Further you may add optional attributes:
- readOnly — is field readOnly. Default is false.
- label — label. Default is label from Object.
- showFiveRecent — feature from standard lookup field, reflects 5 recently viewed records. Default is true.
- widthPX — width of field. Default is ‘300px’.
Here, in Synebo we are always trying to find best and the most optimized way for our customers in order to fully satisfy their needs and it goes without saying that we are adhering to saving their budget. We emphasized for ourselves one of the possible solutions in how to reach this, which is creating components that would accelerate and simplify development process in future. As a result, our company succeeded in creating products and capabilities which are easy to use, integrate and support.
Our company Synebo relentlessly follows all the updates in Salesforce world in a timely manner. Therefore, we share our experience in Lightning.
Originally this article was published here.
By Anastasia Kovalchuk, October 2, 2017