I was playing with lightning component tree in lightning inspector and I came across few standard components that salesforce uses for its own internal UI processing.

 <force:convertModalFooterlead Id="00Q5800000T3POnEAN" isAdvanced="true" howTooltip="false"/> 

Lead convert modal, or

 <forceSearch:inputLookupDesktop dir="ltr"actionable="true"ariaDescribedBy=""value="{!v.ownerId}"visible="true"disableDoubleClicks="false"showErrors="true" isCompound="false"required="true"updateOn="change"updateOnDisabled="false"/>

beautiful record search lookup.

Is there a way we can reuse those already build enterprise-grade components in our custom lightning components? I tried in Dev console it gives me compile time error that no such component found. If so then how is salesforce able to use it in one.app?

| improve this question | | | | |
  • 2
    Probably they are public only to that namespace. – Adrian Larson May 8 '18 at 14:53

Just because you can see them in the inspector doesn't mean you can access them. They actually have a special access level called SYSTEM (if I remember correctly; I did an experiment with Aura previously) that prevents you from using them in your own code. SYSTEM access level is a privileged level with more permissions than user-defined code, much like how the OS of a computer is allowed to do things that applications are not. And, of course, the compiler won't allow you to save your own code that runs at the SYSTEM access level. In other words, the source code for forceSearch:inputLookupDesktop probably starts off like:

<forceSearch:inputLookupDesktop access="SYSTEM" controller="..." ....

Also, interestingly enough, the controllers for these things are actually in Java instead of some sort of managed Apex Code, probably for performance reasons.

| improve this answer | | | | |
  • Makes sense... Was bit curious. – Pranay Jaiswal May 8 '18 at 15:09
  • Am surprised by this answer. I seem to recall them being promoted as being "extensible"; that their functionality could be used as a base component if wrapped inside of another component. Will have to inquire deeper into this. – crmprogdev May 8 '18 at 21:48
  • @crmprogdev If it's not in the public documentation, you can't use it. While there are some odd 200 components now in the public library, most of the UI is still private. – sfdcfox May 8 '18 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.