This guide takes you through the full feature you just built: express interest → receive the invitation email → confirm availability for your party → convert those confirmations into Trial Registrants. Follow the steps in order.
The availability form only shows trials whose Stage = Ready. Set three trials to Ready so you have enough to test the multi-select and the matrix.
Open Trial List View ↗Fill out the public Expression of Interest form as if you were a volunteer.
Open Interest Expression Form ↗EOI Group Member records and
are what let us test the party matrix and the auto-created party registrations later. Use a real email
address you can open for the main person so you can receive the invitation in Step 4.Submit the form. Behind the scenes this creates your Contact (under the "Event Volunteer" account) plus one EOI Group Member per party member.
Confirm the submission landed. Use either route, then click into your Contact record.
Open Report ↗ Open "Event Volunteer" Stakeholder ↗3a. Grab your Contact Id from the URL. With your Contact open, look at the browser address
bar. The Id is the 003… value between /Contact/ and
/view:
.../lightning/r/Contact/003XXXXXXXXXXXXXXX/view
Copy that 003… value.
3b. Open the Developer Console.
3c. Paste this script, replace PASTE_YOUR_CONTACT_ID_HERE with the
Id from 3a, then click Execute. The template Id is already filled in for you.
// === Lucas Museum — send the Trial Availability invitation to YOUR test contact === // 1) Paste your Contact Id between the quotes (from the record URL, Step 3a). Id contactId = 'PASTE_YOUR_CONTACT_ID_HERE'; // 2) Trial Availability Invitation template — already built & deployed. Id templateId = '00XV9000002CDwPMAW'; Messaging.SingleEmailMessage msg = new Messaging.SingleEmailMessage(); msg.setTemplateId(templateId); msg.setTargetObjectId(contactId); // fills {!Contact.*} merge fields + the ?cid= link msg.setSaveAsActivity(false); Messaging.sendEmail(new List<Messaging.SingleEmailMessage>{ msg }); System.debug('>>> Invitation sent to Contact ' + contactId);
Execution finished
successfully (no red errors). If you see an email-deliverability error, make sure your contact has a
valid Email and that Setup → Deliverability is set to All email in the sandbox.TrialAvailabilityInviteService.invite(new List<Id>{ '003…' }); (or
inviteAllEventVolunteers()), which looks the template up by name and sends in bulk.Open the email "Action needed: confirm your availability for the upcoming Lucas Museum trials"
and click CONFIRM MY AVAILABILITY. It deep-links to your personalized availability page
(the page already knows who you are via the ?cid= in the link).
?cid= + your Contact Id:https://lucas-citiri--lucasbox.sandbox.my.site.com/s/trial-availability?cid=003XXXXXXXXXXXXXXX
Open Availability Page (then add ?cid=) ↗
On the page you'll see your name pre-filled at the top. Then:
Switch to the admin side. Go back to the Trial list view and click into one of the Ready trials you selected availability for.
Open Trial List View ↗Confirm everything happened, all on the same trial record:
gm-…@example.com email).