1

I have a requirement where I need to create a lightning component and embed it in the Account record page and within this lightning component I need to display either another lightning component or a vlocity card based on the value of a field on the Account Object. I have developed the second lightning component and the card. I need to create the lightning component with the logic to display either of the two. Please advice on how should I create this logic?

  • In your parent lightning component you can use aura:if . This will help you handle conditional rendereing of child component. – Pranay Jaiswal Jul 4 '18 at 15:25
3

You might not need a third component; you could create an Account Record Page, add both components, and add "filters" to the two components based on your criteria. Doing this, you can choose which of the two components will be shown based on your requirements. In Lightning, just go to an account record, click on the gear icon, then Edit Page, and create a new Record Page. On that page, add both components, click on each one, and alter the filters on the right-hand side of the page editor. You can read more about it in the help topic "Dynamic Lightning Pages".

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.