Skip to content

Commit

Permalink
Added 3 new formula fields on LogEntry__c that reference OTHER formul…
Browse files Browse the repository at this point in the history
…a fields on Log__c so the data can be shown in list views, etc.

The new field LogEntry__c.ProfileLink__c was added to all of the LogEntry__c list views - this should make it easier to recognize trends/patterns when admins/devs are looking at data in the list views

The new formula fields also help to circumvent an issue with the new dynamic higlights panel - it expects the namespaced relationship Nebula__Log__r for the managed package, and I don't want to have to make a script to change to add the namespace in the pipeline (and feels like a flaw on Salesforce's side), so these formula fields are used in the dynamic highlights panel, even though the dynamic highlights panel is capable of referencing parent object fields
  • Loading branch information
jongpie committed Nov 7, 2024
1 parent f9a324e commit c6dc3cd
Show file tree
Hide file tree
Showing 18 changed files with 115 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
<flexiPageRegions>
<itemInstances>
<fieldInstance>
<fieldItem>Record.Log__r.LoggedByUsernameLink__c</fieldItem>
<identifier>RecordLog_rLoggedByUsernameLink_cField2</identifier>
<fieldItem>Record.LoggedByUsernameLink__c</fieldItem>
<identifier>RecordLoggedByUsernameLink_cField</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldItem>Record.Log__r.ProfileLink__c</fieldItem>
<identifier>RecordLog_rProfileLink_cField2</identifier>
<fieldItem>Record.ProfileLink__c</fieldItem>
<identifier>RecordProfileLink_cField</identifier>
</fieldInstance>
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldItem>Record.Log__r.ImpersonatedByUsernameLink__c</fieldItem>
<identifier>RecordLog_rImpersonatedByUsernameLink_cField2</identifier>
<fieldItem>Record.ImpersonatedByUsernameLink__c</fieldItem>
<identifier>RecordImpersonatedByUsernameLink_cField</identifier>
<visibilityRule>
<criteria>
<leftValue>{!Record.Log__r.ImpersonatedByUsernameLink__c}</leftValue>
<leftValue>{!Record.ImpersonatedByUsernameLink__c}</leftValue>
<operator>NE</operator>
</criteria>
</visibilityRule>
Expand Down Expand Up @@ -125,11 +125,11 @@
</itemInstances>
<itemInstances>
<fieldInstance>
<fieldItem>Record.Log__r.ParentLogLink__c</fieldItem>
<identifier>RecordLog_rParentLogLink_cField</identifier>
<fieldItem>Record.ParentLogLink__c</fieldItem>
<identifier>RecordParentLogLink_cField</identifier>
<visibilityRule>
<criteria>
<leftValue>{!Record.Log__r.ParentLogLink__c}</leftValue>
<leftValue>{!Record.ParentLogLink__c}</leftValue>
<operator>NE</operator>
</criteria>
</visibilityRule>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>ImpersonatedByUsernameLink__c</fullName>
<businessStatus>Active</businessStatus>
<complianceGroup>PII;GDPR;CCPA</complianceGroup>
<externalId>false</externalId>
<formula>Log__r.ImpersonatedByUsernameLink__c</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Impersonated By Username</label>
<required>false</required>
<securityClassification>Confidential</securityClassification>
<trackTrending>false</trackTrending>
<type>Text</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>ParentLogLink__c</fullName>
<businessStatus>Active</businessStatus>
<complianceGroup>PII;GDPR;CCPA</complianceGroup>
<externalId>false</externalId>
<formula>Log__r.ParentLogLink__c</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Parent Log</label>
<required>false</required>
<securityClassification>Confidential</securityClassification>
<trackTrending>false</trackTrending>
<type>Text</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>ProfileLink__c</fullName>
<businessStatus>Active</businessStatus>
<complianceGroup>PII;GDPR;CCPA</complianceGroup>
<externalId>false</externalId>
<formula>Log__r.ProfileLink__c</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Profile</label>
<required>false</required>
<securityClassification>Confidential</securityClassification>
<trackTrending>false</trackTrending>
<type>Text</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>OriginType__c</columns>
<columns>OriginLocation__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>ApexClassName__c</columns>
<columns>ApexInnerClassName__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>ComponentType__c</columns>
<columns>ComponentApiName__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>OriginType__c</columns>
<columns>OriginLocation__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>Origin__c</columns>
<columns>ExceptionType__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>OriginLocation__c</columns>
<columns>FlowProcessType__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>Origin__c</columns>
<columns>HttpRequestEndpoint__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>Origin__c</columns>
<columns>HttpResponseStatusCode__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>OriginSourceMetadataType__c</columns>
<columns>Timestamp__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>Origin__c</columns>
<columns>RestRequestUri__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<columns>Log__c</columns>
<columns>LoggingLevel__c</columns>
<columns>LoggedByUsernameLink__c</columns>
<columns>ProfileLink__c</columns>
<columns>Message__c</columns>
<columns>Origin__c</columns>
<columns>RestResponseStatusCode__c</columns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,12 +568,12 @@
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.HttpRequestEndpoint__c</field>
<field>LogEntry__c.HttpRequestEndpointAddress__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.HttpRequestEndpointAddress__c</field>
<field>LogEntry__c.HttpRequestEndpoint__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
Expand Down Expand Up @@ -621,6 +621,11 @@
<field>LogEntry__c.HttpResponseStatus__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ImpersonatedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LimitsAggregateQueriesMax__c</field>
Expand Down Expand Up @@ -991,6 +996,16 @@
<field>LogEntry__c.Origin__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ParentLogLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ProfileLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.RecordCollectionSize__c</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@
<field>LogEntry__c.HasStackTrace__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ImpersonatedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LimitsAggregateQueriesMax__c</field>
Expand Down Expand Up @@ -617,6 +622,16 @@
<field>LogEntry__c.Origin__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ParentLogLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ProfileLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.RecordCollectionSize__c</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,12 @@
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.HttpRequestEndpoint__c</field>
<field>LogEntry__c.HttpRequestEndpointAddress__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.HttpRequestEndpointAddress__c</field>
<field>LogEntry__c.HttpRequestEndpoint__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
Expand Down Expand Up @@ -541,6 +541,11 @@
<field>LogEntry__c.HttpResponseStatus__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ImpersonatedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LimitsAggregateQueriesMax__c</field>
Expand Down Expand Up @@ -911,6 +916,16 @@
<field>LogEntry__c.Origin__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ParentLogLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.ProfileLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.RecordCollectionSize__c</field>
Expand Down

0 comments on commit c6dc3cd

Please sign in to comment.