2

Once deployed, I can see the component from the Home page in Custom Code > Lightning Components > Lightning Components, however when I Edit the Sales Page (or any other) it is not under Custom components to be dragged onto the page?!

I have spent hours on this, reading articles like these below, and trying all their suggested options, but have been unable to find a solution to this fundamental problem?

Same issue (seems common), however no help:

https://developer.salesforce.com/forums/?id=9062I000000QvQUQA0

https://success.salesforce.com/answers?id=9063A000000E6hFQAS

Lightning Web Components - Not available in app builder

Any help would be appreciated?

<?xml version="1.0" encoding="UTF-8" ?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="helloWorld">
    <apiVersion>45.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
    </targets>
</LightningComponentBundle>

enter image description here

enter image description here

enter image description here

  • can you show meta file? and also in which object/record home page? – salesforce-sas Aug 26 '19 at 5:55
  • <?xml version="1.0" encoding="UTF-8" ?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="helloWorld"> <apiVersion>45.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__RecordPage</target> <target>lightning__AppPage</target> <target>lightning__HomePage</target> </targets> </LightningComponentBundle> i created a scratch org and tried to use the sales object/app/record.a – Richard Hounslow Aug 27 '19 at 3:17
  • How about moving the apiVersion to 46.0? – Caspar Harmer Aug 27 '19 at 6:39
  • Yup tried that too!? – Richard Hounslow Aug 27 '19 at 6:48
  • Can you share the full code (including the .html file?) the screen shot of the push just shows a js file – Mikey Aug 28 '19 at 1:40
0

Although you are exposing to the type of page (app,record and object home), You should also mention which objects in specific contexts in targetConfigs.

For example, below is sample code which exposes to record page in Account and Opportunity:

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="poc">
    <apiVersion>45.0</apiVersion>
    <isExposed>true</isExposed>
  <masterLabel>LWC Comp POC</masterLabel>
  <description>This is a demo component.</description>
  <targets>
      <target>lightning__RecordPage</target>
      <target>lightning__AppPage</target>
      <target>lightning__HomePage</target>
  </targets>
  <targetConfigs>
      <targetConfig targets="lightning__RecordPage">
          <objects>
              <object>Account</object>
              <object>Opportunity</object>
          </objects>
      </targetConfig>
  </targetConfigs>
</LightningComponentBundle>
| improve this answer | |
  • I used the above and changed fqn="helloworld", ie. the same the component. Created a new Opportunity, edited it, and there is still no custom component to drag onto the page? – Richard Hounslow Aug 27 '19 at 6:01
  • check if it got deployed properly. Then refresh the components list, it will definitely come – salesforce-sas Aug 27 '19 at 6:04
  • You can see here that it was pushed and uploaded successfully, but is still not avail under custom? Salesforce Component Issue – Richard Hounslow Aug 27 '19 at 6:22
  • I cant open link. Can you paste the photo in question. You just need to edit the question and paste the photo where required – salesforce-sas Aug 27 '19 at 6:25
  • ok, done. The link should work? – Richard Hounslow Aug 27 '19 at 6:33

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