Skip to content

New LoggerScenario__c Custom Object

Compare
Choose a tag to compare
@jongpie jongpie released this 08 Sep 02:44
· 101 commits to main since this release
5f59b7a

⚠️ For orgs that are upgrading to this version & use scenario-based logging functionality (stored in Log__c.Scenario__c): you may need to update any customizations in your org, as this release deprecates the text field Log__c.Scenario__c. If you have any customizations or plugins that leverage this field, you'll need to switch to using the new lookup field Log__c.TransactionScenario__c.

Closed #349 by deprecating the field Log__c.Scenario__c and replacing it with a new optional lookup Log__c.TransactionScenario__c that leverages the new custom object LoggerScenario__c . The LoggerScenario__c object does not currently have any automation built-in - this PR is focused on just getting the object introduced, more features will be added later.

  • Added LoggerScenario__c object with a uniqued external ID field LoggerScenario__c .Unique__c - this is set based on the value LogEntryEvent__e.Scenario__c (which can be set using Logger.setScenario(String)

  • Added new "Logger Scenarios" tab to the Logger Console app, and rearranged the ordering of the included tabs

    image

  • Added skeleton trigger handler class LoggerScenarioHandler - there's currently no object-specific logic implemented, but this provides an entry point for plugins. Additional logic will probably also be incorporated as part of #355

  • Added flexipage, page layout, compact layout, etc for the new object. I've arranged the UI to mimic the UI of the Log__c object's flexipage/layout

    image

  • Added an Apex script ./scripts/data/migrate-log-scenario-field-to-logger-scenario-object.apex that migrates existing data from the text field Log__c.Scenario__c to the new object & lookup Log__c.TransactionScenario__c.

    • Existing orgs can run the script after upgrading to update existing records - but depending on how many Log__c records need to be updated, the script may need to be executed multiple times. It's not ideal, but this approach is easier that deploying a new, temporary batch job to do it in bulk.
  • Updated LoggerAdmin, LoggerLogViewer, and LoggerEndUserpermission sets to have access to the newLoggerScenario__c` object

  • Updated LoggerEndUser permission set to have read-only access to the tagging & scenario custom objects