Critical Updates. They're a part of life on the Salesforce platform but, let's face it, they can be a bit of a fly in the 'ol ointment. Let's make things easier.
sfdx-upcruc
...
- is a plugin for the
sfdx
command line tool ✅ - can output CRUCs to useful file types (
.tsv
,.ical
) ✅ - is easy to integrate into dev pipelines ✅
- means you never need to deal with CRUCs again! ❌ (sorry)
# shell (bash, zsh, etc)
sfdx plugins:install sfdx-upcruc
sfdx upcruc:list -u <username> [-ti -d <directory>] [--json] [--verbose]
sfdx-upcruc
keeps the command options short and sweet so you can get straight to what you want - that list of upcoming CRUCs!
Short Flag | Long Flag | Required | Result |
---|---|---|---|
-u |
--targetusername |
Yep | username/alias from which to retrieve CRUCs |
-t |
--tsv |
create a tab-separated-value file (.tsv) | |
-i |
--ical |
create an ical file (.ical) | |
-d |
--dir |
location where output file(s) will be created; defaults to current directory | |
--json |
print output as json rather than a table |
||
--verbose |
do not trim cruc cells to space |
In addition to command flags, you may include the following key=value
strings. They are never required.
Key | Result | Example | Notes |
---|---|---|---|
fname |
Value will be used as filename for any output (-ti ) files |
fname=orgCrucs |
Do not include file extensions. We'll do that for you. |
calprefix |
When creating a .ical file (-i ), value will preface event names |
calprefix="My Org CRUCs: " |
Remember to include a space after your prefix. We won't do everything. 😉 |
CRUC events created in .ical
files will always have an id
that is unique to the org from which they were retrieved. This is really great news for you because, as you generate new .ical
files in the future, you can simply import them to your calendar application and the old events (should) get updated with the new information.
For inquiring minds...
Unique ids are generated by hashing (orgId + crucActivationPath) using the
sha-1
algorithm. Because sandbox ids change upon refresh, only CRUCs pulled from production orgs are guaranteed to be immutable.
Critical update descriptions may contain commas themselves, so we decided to go with tab-separated instead. If you'd like .csv
support added in the future yell at us really loudly open an issue in the repo and we promise to take a look.
Indeed. sfdx-upcruc
prints CRUCs to stdout
in condensed table format, but you can change that using --verbose
or --json
for all your piping and redirection adventures.
CRUCs are printed to stdout
(your terminal window) in table format, where each cell is limited to 50 chars. Use the --json
or --verbose
flags if you need the full monty.