Skip to content

Commit 7677db5

Browse files
committed
release 1.38
1 parent 43d9264 commit 7677db5

File tree

2 files changed

+120
-14
lines changed

2 files changed

+120
-14
lines changed

CHANGES.md

Lines changed: 82 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,88 @@
11
# Release Notes
22

33
## Version 1.38
4-
- Inspect: field usage [issue 268](https://github.com/dufoli/Salesforce-Inspector-Advanced/268)
5-
- Flow Analyzer: new tool to analyze and optimize Salesforce Flows. Accessible via "Analyze Flow" button when viewing a Flow in Flow Builder. Scans flow metadata for potential issues including:
6-
- **Performance**: DML operations in loops (Get/Update/Create/Delete Record), action calls in loops, Get Record retrieving all fields
7-
- **Best Practices**: Missing flow description, unused variables, unconnected elements, copy API names, not using Auto Layout
8-
- **Security & Reliability**: Hardcoded IDs and URLs, missing fault paths, missing null handlers, unsafe running context
9-
- **Maintainability**: High cyclomatic complexity, flow naming conventions, old API versions, too many flow versions
10-
- **Logic Issues**: Recursive after update triggers, same record field updates
11-
Results are displayed with severity levels (error, warning, info) and actionable recommendations to help maintain secure, performant, and reliable Flow automations. [issue 251](https://github.com/dufoli/Salesforce-Inspector-Advanced/251)
12-
- Metadata: upload and generate package.xml
13-
- Editor: improve suggestion position
4+
5+
### Inspect
6+
- **Field Usage Analysis**: New feature to analyze field usage across your Salesforce org. View the percentage of records that have values populated for each field, helping you identify unused or underutilized fields. Accessible via the "Show field usage" option in the object actions menu. [issue 268](https://github.com/dufoli/Salesforce-Inspector-Advanced/268)
7+
- **Polymorphic Field Types Display**: Improved display of polymorphic reference fields in the Type column. When a field references multiple object types, only the first 3 types are shown initially with a clickable "...(X more)" link to expand and view all remaining types. This makes the interface cleaner and easier to read when dealing with fields that reference many object types.
8+
9+
### Flow Analyzer
10+
New comprehensive tool to analyze and optimize Salesforce Flows. Accessible via the "Analyze Flow" button when viewing a Flow in Flow Builder. The analyzer scans flow metadata for potential issues across multiple categories:
11+
12+
- **Performance Issues**:
13+
- DML operations in loops (Get/Update/Create/Delete Record)
14+
- Action calls within loops
15+
- Get Record elements retrieving all fields instead of specific fields
16+
17+
- **Best Practices**:
18+
- Missing flow descriptions
19+
- Unused variables
20+
- Unconnected elements
21+
- Copy API names (should use labels)
22+
- Not using Auto Layout
23+
24+
- **Security & Reliability**:
25+
- Hardcoded IDs and URLs
26+
- Missing fault paths
27+
- Missing null handlers
28+
- Unsafe running context configurations
29+
30+
- **Maintainability**:
31+
- High cyclomatic complexity
32+
- Flow naming convention violations
33+
- Old API versions in use
34+
- Too many flow versions
35+
36+
- **Logic Issues**:
37+
- Recursive after update triggers
38+
- Same record field updates
39+
40+
Results are displayed with severity levels (error, warning, info) and include actionable recommendations to help maintain secure, performant, and reliable Flow automations. [issue 251](https://github.com/dufoli/Salesforce-Inspector-Advanced/251)
41+
42+
### Org Analyzer
43+
Expanded with many new detection rules to help identify potential issues and optimization opportunities:
44+
45+
- **Unused Resources**:
46+
- Custom fields with no references (flow, Apex, layout) and no data
47+
48+
- **Code Quality**:
49+
- Too many validation rules per object
50+
- Too many triggers per object
51+
- SOQL queries in loops
52+
- DML operations in loops
53+
- Hardcoded IDs in code instead of custom labels
54+
- SOQL injection vulnerabilities (missing escape on parameters)
55+
- Apex classes without explicit sharing model
56+
- Apex triggers containing logic, SOQL, or DML instead of delegating to service classes
57+
- Unreferenced Apex classes (excluding REST Apex)
58+
- Batchable, Queueable, or Schedulable classes without jobs in the last 365 days
59+
60+
- **Flow Management**:
61+
- Flows with too many versions
62+
- Flows using old API versions
63+
64+
- **Migration Opportunities**:
65+
- Process Builder or Workflow Rules that should be migrated to Flow
66+
- Visualforce pages or Lightning Components that should be migrated to LWC
67+
68+
- **Security & Access Management**:
69+
- Too many system administrators
70+
- Role Hierarchy with too many levels
71+
- Users without login activity for extended periods or never logged in
72+
- Connected Apps with admin pre-authorized users having too many permissions
73+
- Connected Apps with admin pre-authorized users without proper permissions
74+
75+
### Metadata
76+
- **Package.xml Generation**: Upload metadata files and automatically generate a `package.xml` file, streamlining the process of creating deployment packages.
77+
78+
### Editor
79+
- **Suggestion Positioning**: Improved positioning of code suggestions to better align with the cursor and provide a more intuitive editing experience.
80+
81+
### Options
82+
- **Favicon Color Picker**: New color picker in the options page to customize the favicon color for your Salesforce environment and extension, making it easier to visually distinguish between different orgs.
83+
84+
### Popup
85+
- **Clone User**: New functionality to clone user records directly from the popup interface, simplifying user management tasks.
1486

1587

1688
## Version 1.37

addon/inspect.js

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,13 +1883,47 @@ class FieldValueCell extends React.Component {
18831883
}
18841884

18851885
class FieldTypeCell extends React.Component {
1886+
constructor(props) {
1887+
super(props);
1888+
this.state = {
1889+
showAllTypes: false
1890+
};
1891+
this.onShowMoreClick = this.onShowMoreClick.bind(this);
1892+
}
1893+
onShowMoreClick(e) {
1894+
e.preventDefault();
1895+
this.setState({showAllTypes: true});
1896+
}
18861897
render() {
18871898
let {row, col} = this.props;
1899+
const MAX_INITIAL_TYPES = 3;
1900+
let referenceTypes = row.referenceTypes();
1901+
1902+
if (referenceTypes && referenceTypes.length > 0) {
1903+
const isPolymorphic = referenceTypes.length > MAX_INITIAL_TYPES;
1904+
const typesToShow = this.state.showAllTypes
1905+
? referenceTypes
1906+
: referenceTypes.slice(0, MAX_INITIAL_TYPES);
1907+
const remainingCount = referenceTypes.length - MAX_INITIAL_TYPES;
1908+
1909+
return h("td", {className: col.className + " quick-select"},
1910+
typesToShow.map(data =>
1911+
h("span", {key: data}, h("a", {href: row.showReferenceUrl(data)}, data), " ")
1912+
),
1913+
isPolymorphic && !this.state.showAllTypes && remainingCount > 0
1914+
? h("span", {key: "more"},
1915+
h("a", {
1916+
href: "about:blank",
1917+
onClick: this.onShowMoreClick,
1918+
style: {cursor: "pointer", textDecoration: "underline", color: "#0066cc"}
1919+
}, "...(" + remainingCount + " more)")
1920+
)
1921+
: null
1922+
);
1923+
}
1924+
18881925
return h("td", {className: col.className + " quick-select"},
1889-
row.referenceTypes() ? row.referenceTypes().map(data =>
1890-
h("span", {key: data}, h("a", {href: row.showReferenceUrl(data)}, data), " ")
1891-
) : null,
1892-
!row.referenceTypes() ? h(TypedValue, {value: row.sortKey(col.name)}) : null
1926+
h(TypedValue, {value: row.sortKey(col.name)})
18931927
);
18941928
}
18951929
}

0 commit comments

Comments
 (0)