hardis:org:fix:listviewmine
Description
Fix listviews whose scope Mine has been replaced by Everything
List of ListViews can be:
- read from .sfdx-hardis.yml file in property listViewsToSetToMine
- sent in argument listviews
Note: property listViewsToSetToMine can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration
autoCleanTypes:
- listViewsMine
- Example of sfdx-hardis.yml property
listViewsToSetToMine
:
listViewsToSetToMine:
- "force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml"
- "force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml"
- "force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml"
- "force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml"
- "force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml"
- "force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml"
- If manually written, this could also be:
listViewsToSetToMine:
- "Operation__c:MyCurrentOperations"
- "Operation__c:MyFinalizedOperations"
- "Opportunity:Default_Opportunity_Pipeline"
- "Opportunity:MyCurrentSubscriptions"
- "Opportunity:MySubscriptions"
- "Account:MyActivePartners"
Troubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:
# Do not use puppeteer embedded chromium
RUN apk add --update --no-cache chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
ENV CHROMIUM_PATH="/usr/bin/chromium-browser"
ENV PUPPETEER_EXECUTABLE_PATH="$\{CHROMIUM_PATH}" // remove \ before {
Parameters
Name | Type | Description | Default | Required | Options |
---|---|---|---|---|---|
debug -d |
boolean | Activate debug mode (more logs) | |||
flags-dir | option | undefined | |||
json | boolean | Format output as json. | |||
listviews -l |
option | Comma-separated list of listviews following format Object:ListViewName | |||
Example: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities | |||||
skipauth | boolean | Skip authentication check when a default username is required | |||
target-org -o |
option | undefined | |||
websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration |
Examples
$ sf hardis:org:fix:listviewmine
$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners