Custom component to display images from external data source
Table of Contents
Overview
This article describes how you can display student profile images, which are stored in an external data source, on the grading and attendance components.
You will need to create a custom Aura component, and have it referenced by the grading and attendance components, in order to display the images.
Note: This is supported only from v3.14.4 onwards.
Setup
What is needed in your custom component
The following parameters can be passed through to your custom component:
- contactId - This is the Salesforce record ID for the student's Contact.
- ccId - This is the Salesforce record ID for the student's Course Connection.
By including these attributes in your custom component, you will be able to reference them in your custom code for finding the appropriate image to display.
For best results, the output should use the <lightning:avatar> tags.
E.g.
<lightning:avatar size="slds-avatar_medium" fallbackIconName="standard:avatar" src="{!v.myCustomSource}" variant="circle"/>
Having your component referenced by the attendance and grading components
The following existing components allow student images to be displayed next to the Student:
- RIO Ed - Attendance - Session List (Aura).
- RIO Ed - Attendance Register (Aura).
- RIO Ed - Session Grading (Aura).
As of v3.14.4, each of those components have an attribute “Custom Picture Component Name” , which allows you to reference your custom component.