This article explains how to find a specific field in a Salesforce Custom Metadata Type and modify its text values, providing step-by-step instructions for clarity and ease of use
Create a Record-triggered flow on GW_Volunteers__Volunteer_Hours__c object. When new Volunteer Hours are added, Flow will query related Events and then related Event attendees. If it does not find the attendee, it will add a new one based on Contact on the Volunteer Hour record. Here is the step by step guide for creating this Flow.
Step 1 : Select Flow Type
Step 2: Select Object
Step 3: Add a Get Records Element to Query Event Records
{!$Record.GW_Volunteers__Volunteer_Shift__r.Id} as shown belowStep 4: Check if Any Linked Event Exist
Step 5: Check If Contact Already On The Event
( {!Get_Event_Linked_With_Shift.WhoId} ) matches the Contact ( {!$Record.GW_Volunteers__Contact__c} ) on the Volunteer Hours recordStep 6: Get Existing Event Relation Records
EventRelation, Add a new Get Records element which will query the EventRelation object with conditions Event ID = Event Id we queried in get element = {!Get_Event_Linked_With_Shift.Id}Relation ID = Contact on the Volunteer Hour Record = {!$Record.GW_Volunteers__Contact__c}Step 7: Check if EventRelation Exists
(IsEmpty = False). Name the outcome as Yes and API Name Yes_Event_Relation_Exists. Rename the default outcome to NoStep 8: Add Event Attendee
Event ID = Event Queried in Previous Get Element = {!Get_Event_Linked_With_Shift.Id}Relation Id = Contact on the Volunteer Hours = {!$Record.GW_Volunteers__Contact__c}Step 9: Save and Activate the Flow
_______________________________________________________________________
Written by: Sushil Kumar | Forum Ambassador
Sushil Kumar is a Salesforce Technical Architect at UKG. At the time of writing, Sushil has worked in the Salesforce ecosystem for 14 Years, holds 14 Salesforce Credentials including Salesforce Application and System Architect. Sushil serves as a Trailblazer Community Forum Ambassador, and regularly participates in the community.
Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials). Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality, usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a “best” answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.
If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed
005166989

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.