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

Log Entry Detail not created using SYNCHRONOUS_DML #526

Closed
jongpie opened this issue Jul 9, 2023 Discussed in #511 · 2 comments · Fixed by #539
Closed

Log Entry Detail not created using SYNCHRONOUS_DML #526

jongpie opened this issue Jul 9, 2023 Discussed in #511 · 2 comments · Fixed by #539
Assignees
Labels
bug Something isn't working log management Items related to the custom objects & Logger Console app tags Relates to functionality for tagging/labeling

Comments

@jongpie
Copy link
Owner

jongpie commented Jul 9, 2023

Discussed in #511

Originally posted by cbcruz74 June 14, 2023
Hi, we could not get the Log Entry Tag records to be created using SYNCHRONOUS_DML. Log and Log Entry are being created as expected.
The Log Entry Tag records are created with EVENT_BUS only.

Is this working as designed?

@jongpie jongpie added bug Something isn't working tags Relates to functionality for tagging/labeling log management Items related to the custom objects & Logger Console app logger engine Items related to the core logging engine labels Jul 9, 2023
@JMercie
Copy link
Contributor

JMercie commented Aug 18, 2023

I can look at this to see if I can fix it! I will try to test the scenario and try to find out a fix.

@JMercie
Copy link
Contributor

JMercie commented Aug 19, 2023

Hey @jongpie, I think I found the problem
image

When the operation save method is SYNCHRONOUS_DML, the logEntryEvent does not have a UUID, so the else statement never gets executed. Because of this, "this.tagNames" is always empty when the transaction evaluates "upsertLogEntryTags()" method.

image

The solution may be finding another unique identifier for the map, so when we want to reference it with a .get(), we can assign the value unequivocally to the tag record.

@jongpie jongpie removed the logger engine Items related to the core logging engine label Aug 25, 2023
jongpie pushed a commit that referenced this issue Oct 4, 2023
…ethod (#539)

* Added new field LogEntry__c.UniqueId__c to upsert LogEntry__c records

* Fixed SYNCHRONOUS_DML + tagging bug (#526) in LogEntryEventHandler by switching to new composite key field LogEntry__c.UniqueId__c to get tags

* Added new field LogEntry__c.UniqueId__c to FlexiPage LogEntryRecord and permission sets

* Scope creep: also added some conditional visibility rules in FlexiPage LogEntryRecord for the existing fields EntryScenarioLink__c and EventUuid__c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working log management Items related to the custom objects & Logger Console app tags Relates to functionality for tagging/labeling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants