Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setRecord method to LogEntryEventBuilder for handling Set of Ids and List of Ids #792

Merged
merged 8 commits into from
Nov 7, 2024

Conversation

alanjaouen
Copy link
Contributor

As LogEntryEventBuilder provide methods setRecord(SObject record) and setRecord(List<SObject> records), I sugest to add setRecord(Set<Id> recordsIds) to complete setRecord(Id recordId)

I reused setRecord(List<SObject> records) to avoid duplicating code, but feel free to give me your though on this

jamessimone
jamessimone previously approved these changes Nov 1, 2024
Copy link
Collaborator

@jamessimone jamessimone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @alanjaouen - @jongpie will create a new package version for you

@alanjaouen
Copy link
Contributor Author

thanks for your feedback

please rebase before merging to squash commits together

alanjaouen and others added 4 commits November 7, 2024 11:57
@jongpie jongpie added Type: Enhancement New feature or request Logging Source: Apex Items related to using Logger within Apex Layer: Logger Engine Items related to the core logging engine labels Nov 7, 2024
jongpie
jongpie previously approved these changes Nov 7, 2024
Copy link
Owner

@jongpie jongpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanjaouen thanks so much for working on this, and @jamessimone thanks for reviewing it! I've pushed up a couple of small changes:

  • Rebased the branch to main
  • Added an extra test method to validate that List<Id> also works as a parameter for setRecord()
  • Made the reference to Iterable use a fully qualified ref System.Iterable
  • Bumped the version number & name + created a new package version

I'm working on release notes now, I should have this released later today.

Copy link
Owner

@jongpie jongpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed 1 more change to handle null values for the Iterable<Id> parameter - previously, a null value caused a NullPointerException.

@jongpie jongpie changed the title Add setRecord method to LogEntryEventBuilder for handling Set of Ids Add setRecord method to LogEntryEventBuilder for handling Set of Ids and List of Ids Nov 7, 2024
@jongpie jongpie merged commit 1b437ce into jongpie:main Nov 7, 2024
1 check passed
@jamessimone
Copy link
Collaborator

Nice, thanks!

@jongpie
Copy link
Owner

jongpie commented Nov 7, 2024

Alright, this is now available in release v4.14.18! Thanks again @alanjaouen for this idea/PR, I think this is a really great enhancement 🎉 🥳

@alanjaouen alanjaouen deleted the feat/relatedRecordsIds branch November 7, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: Logger Engine Items related to the core logging engine Logging Source: Apex Items related to using Logger within Apex Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants