0

So i have followed this tutorial on how to create a custom multi select for accounts (I am going to use it for users) I want to add this in the Page Layout on the Account page but I am having some issues actually getting this to show up to add onto the page layout.

Any Help is much appreciated

Tutorial I followed: http://sfdcmonkey.com/2018/02/20/multi-select-lookup-salesforce-lightning/#comment-10782

  • You can't add a Lightning Application to a page layout. Are you trying to add this thing in Classic or Lightning? – sfdcfox Sep 26 '18 at 20:37
  • I am trying to add it to Lightning. So if I can't add it to the Page Layout where would I add Lightning Applications? – Gunner1714 Sep 26 '18 at 20:41
2

Lightning Applications are generally used for Lightning Out and testing purposes. To add the component to your a record detail page, make sure you have a component that implements flexipage:availableForRecordHome, then create a new Record Page and assign it to your Account object.

The component should start off like this:

<aura:component implements="flexipage:availableForRecordHome" ...

To assign a custom Lightning Page, view any account, click on the Gear icon, click on Edit Page, and follow the wizard to add the component to the page.

  • sfdcfox, thanks for that answer. What do you recommend to make this available in a record page? Do I create a Visualforce page, since I have to pass in variables or is there another way to do this? – Gunner1714 Sep 27 '18 at 13:07
  • @Gunner1714 You use force:hasRecordId on the component to get the record's ID, and if you need additional variables, you can do so via a design file. There's no need to make a VF page for this. – sfdcfox Sep 27 '18 at 14:24
  • so here is what I am trying to accomplish, let me know your thoughts. We have accounts and we send out trainers out when they first sign up. We want to track who was sent out to those sites. This could be 1 trainer or 20 trainers. We want to report against this also. Thanks for any help. – Gunner1714 Sep 27 '18 at 15:01
  • @Gunner1714 yes, you'd use a junction object for this. You can report on them like any other normal object. – sfdcfox Sep 27 '18 at 15:41
  • 1
    @Gunner1714 I don't have an example, but yes, you need one object, two fields, master-detail to account, lookup to user. Your component would allow selection of multiple users, and insert/update/delete your custom object records based on the changes the user makes. – sfdcfox Sep 28 '18 at 18:46

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.