Skip to content

Conversation

@kadp89
Copy link

@kadp89 kadp89 commented Oct 26, 2025

Critical Changes

None

Changes

  • Added SummitEventsRtfLinkPipeline class to detect <img> tags in rich text fields and replace embedded ContentVersion URLs with corresponding ContentDistribution public URLs.
  • Added Apex test class SummitEventsRtfLinkPipeline_TEST with passing coverage.
  • Added SummitEventsTrigger to invoke the pipeline on Summit_Events__c insert and update.
  • Added two fields to Summit_Events_Settings__c to toggle trigger execution and opt into automation.
  • Updated .gitignore and .forceignore to remove local development artifacts.

Issues Closed

Closes #618

@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @kadp89 to sign the Salesforce Inc. Contributor License Agreement.

@kadp89 kadp89 marked this pull request as ready for review October 26, 2025 12:46
@kadp89 kadp89 closed this Oct 26, 2025
@kadp89 kadp89 reopened this Oct 26, 2025
@kadp89 kadp89 marked this pull request as draft October 26, 2025 12:57
Previous version was overly defensive w.r.t. heap limits. After
verifying max field lengths on Summit_Events__c (~13k chars), exotic
use of DML in loop is unnecessary and best practices can be followed
safely.

TODO: review push() for null safety and investigate potential
duplication issues in create()
Adds a dedicated handler for the RTF pipeline. Trigger now delegates
to handler and passes in the correct trigger context variable. Lays
groundwork for future async processing.
Dynamic SOQL was necessary to ensure the full Summit_Events__c object
could be introspected and was reinserted. In support, RTF pipeline
constructor refactored to accept Trigger.newMap so Ids can be easily
extracted and queried. Test class, trigger framework, and minimal
handler all updated accordingly. Ready for review.
@kadp89 kadp89 marked this pull request as ready for review October 28, 2025 11:21
@kadp89
Copy link
Author

kadp89 commented Nov 22, 2025

Hello! I submitted this PR a few weeks ago. When you have time, I'd appreciate a review. Happy to iterate as needed. Thanks!

@tcdahlberg
Copy link
Contributor

@kadp89 thank you for the work and the PR! At a glance I'm impressed. I especially liked that you added an opt in setting as I was thinking there might be a scenario where SEA users would want to remain in control of public image access and wouldn't want to force this trigger on them.

One thing that might be good is to check if the richtext fields are isUpdateable before even acting upon them. This whole process would assume that permission to edit rich text fields has been given in a permission set, if it hasn't we might as well stop the process before it begins.

We have been slowly working on getting person account matching active in the next release, so I've been a bit slow in pulling in PR code and testing. Sorry about that. We had a good testing day yesterday and are pretty confident things are working for a release. We may just release to get person account out the door so we can move on to more fun things like this.

btw. If you want to be a part of the core group SEA meetings connect with me on trailhead or linked in and let me know.

@kadp89
Copy link
Author

kadp89 commented Nov 23, 2025

@tcdahlberg thanks for the review! No worries about the timing -- I'll get to work on the isUpdateable functionality and reach out on Trailhead and LinkedIn soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Automate creation of public links for Rich Text Field images in Summit Events

2 participants