Skip to content

Commit

Permalink
Added new formula fields display the logging user's username as text (#…
Browse files Browse the repository at this point in the history
…567)

* Added new formula fields Log__c.LoggedByUsernameText__c and LogEntry__c.LoggedByUsernameText__c

* Updated the report LogEntrySummary to use the new field Log__c.LoggedByUsernameText__c field, instead of the existing field Log__c.LoggedByUsernameLink__c
  • Loading branch information
JMercie authored Oct 11, 2023
1 parent d1ed36e commit 4ede2fb
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ The most robust logger for Salesforce. Works with Apex, Lightning Components, Fl

## Unlocked Package - v4.11.8

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001Oig9QAC)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001Oig9QAC)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001OigJQAS)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001OigJQAS)
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)

`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001Oig9QAC`
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001OigJQAS`

`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001Oig9QAC`
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001OigJQAS`

---

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>LoggedByUsernameText__c</fullName>
<businessStatus>Active</businessStatus>
<complianceGroup>PII;GDPR;CCPA</complianceGroup>
<externalId>false</externalId>
<formula>Log__r.LoggedByUsernameText__c</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Username</label>
<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,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>LoggedByUsernameText__c</fullName>
<businessStatus>Active</businessStatus>
<complianceGroup>PII;HIPAA;CCPA</complianceGroup>
<externalId>false</externalId>
<formula>IF(ISBLANK(LoggedBy__c),
&apos;Anonymous&apos;,
IF(ISPICKVAL(UserType__c, &apos;AutomatedProcess&apos;),
TRIM(LoggedBy__r.FirstName + &apos; &apos; + LoggedBy__r.LastName),
LoggedByUsername__c)
)</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Username</label>
<required>false</required>
<securityClassification>Confidential</securityClassification>
<trackHistory>false</trackHistory>
<trackTrending>false</trackTrending>
<type>Text</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,11 @@
<field>LogEntry__c.LoggedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LoggedByUsernameText__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LoggingLevelOrdinal__c</field>
Expand Down Expand Up @@ -824,8 +829,8 @@
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>LogEntryTag__c.UniqueId__c</field>
<editable>false</editable>
<field>LogEntry__c.UniqueId__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
Expand Down Expand Up @@ -938,6 +943,11 @@
<field>Log__c.LoggedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>Log__c.LoggedByUsernameText__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>Log__c.LoggedByUsername__c</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@
<field>LogEntry__c.LoggedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LoggedByUsernameText__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LoggingLevelOrdinal__c</field>
Expand Down Expand Up @@ -600,7 +605,7 @@
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntryTag__c.UniqueId__c</field>
<field>LogEntry__c.UniqueId__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
Expand Down Expand Up @@ -678,6 +683,11 @@
<field>Log__c.LoggedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>Log__c.LoggedByUsernameText__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>Log__c.LoggedByUsername__c</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,11 @@
<field>LogEntry__c.LoggedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LoggedByUsernameText__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntry__c.LoggingLevelOrdinal__c</field>
Expand Down Expand Up @@ -749,7 +754,7 @@
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>LogEntryTag__c.UniqueId__c</field>
<field>LogEntry__c.UniqueId__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
Expand Down Expand Up @@ -862,6 +867,11 @@
<field>Log__c.LoggedByUsernameLink__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>Log__c.LoggedByUsernameText__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>false</editable>
<field>Log__c.LoggedByUsername__c</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<groupingColumn>Log__c.StartTime__c</groupingColumn>
<legendPosition>Right</legendPosition>
<location>CHART_BOTTOM</location>
<secondaryGroupingColumn>Log__c.LoggedByUsernameLink__c</secondaryGroupingColumn>
<secondaryGroupingColumn>LogEntry__c.LoggedByUsernameText__c</secondaryGroupingColumn>
<showAxisLabels>false</showAxisLabels>
<showPercentage>false</showPercentage>
<showTotal>false</showTotal>
Expand Down Expand Up @@ -91,7 +91,7 @@
</groupingsDown>
<groupingsDown>
<dateGranularity>Day</dateGranularity>
<field>Log__c.LoggedByUsernameLink__c</field>
<field>LogEntry__c.LoggedByUsernameText__c</field>
<sortOrder>Asc</sortOrder>
</groupingsDown>
<groupingsDown>
Expand Down
1 change: 1 addition & 0 deletions sfdx-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"Nebula Logger - [email protected]()": "04t5Y000001HZfGQAW",
"Nebula Logger - Core@4.11.7-bugfix-for-tags-not-saving-for-save-method-synchronous_dml": "04t5Y000001HZfaQAG",
"Nebula Logger - [email protected]__c.httpresponseheaders__c": "04t5Y000001Oig9QAC",
"Nebula Logger - [email protected]__c.loggedbyusernametext__c-and-logentry__c.loggedbyusernametext__c": "04t5Y000001OigJQAS",
"Nebula Logger - Core Plugin - Async Failure Additions": "0Ho5Y000000blO4SAI",
"Nebula Logger - Core Plugin - Async Failure [email protected]": "04t5Y0000015lhiQAA",
"Nebula Logger - Core Plugin - Async Failure [email protected]": "04t5Y0000015lhsQAA",
Expand Down

0 comments on commit 4ede2fb

Please sign in to comment.