Category: Apex

Salesforce Collections: Set, List

You can create a Set in Apex as below Set<String> colorSet = new Set<String> {‘Red’, ‘Blue’, ‘Orange’}; To create list, use the syntax below List<String> colorList = new List<String> {‘Brown’, ‘Black’, ‘Green’, ‘White’}; Convert from List to Set Set<String> newColorSet= new Set<String>(colorList); Convert from Set to List List<String> newColorList = new List<String>(colorSet); You can also …

Continue reading

Permanent link to this article: https://salesforcebuddy.com/2020/05/salesforce-collections-set-list/

Send Email using aura components

This post shows how to send an email using aura component in salesforce lightning. EmailParticipants.cmp EmailParticipantsController.js EmailParticipantsHelper.js EmailParticipantController.cls

Permanent link to this article: https://salesforcebuddy.com/2020/05/send-email-using-aura-components/

Conditional Rendering using aura:if

As we use aura:components, there will be times when we want to show or hide some component or text or table based on some condition. For example: if we are displaying a datatable based on a list of values. If the list is not empty, show the table otherwise, show a message that no results …

Continue reading

Permanent link to this article: https://salesforcebuddy.com/2020/04/conditional-rendering-using-auraif/