Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Salesforce DX for Accidential Admins
1. Salesforce DX for Accidental
Admins
Can we steal some good things from developers?
@mhumpolec
Martin Humpolec, Senior Consultant
2. Forward-Looking Statements
Statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if
any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-
looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of
product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of
management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments
and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our
service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of
growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and
any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain,
and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling
non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the
financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form
10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the
Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may
not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently
available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
3. Meet Martin Humpolec
Salesforce Consultant
Lightning Champion
Trailhead & Certification Addict
Prague Salesforce User Group Leader
CzechDreamin konference organizer
exDeveloper
Blogger: MartinHumpolec.cz
Twitter: @mhumpolec
33. It is good to have a backup
https://packagebuilder.herokuapp.com/
34. It is good to have a backup
• sfdx force:mdapi:retrieve -r ./source -u MyOrg -k
./source/package.xml [-p PackageName]
• Unzip the downloaded zip file
41. Be super quick (2)
• sfdx force:mdapi:convert -r ./source
• Update what you want to update right in the file
• sfdx force:source:convert -d ./source
• sfdx force:mdapi:deploy -d ./source [-o]
42. Be super quick (more friendly way?)
• sfdx force:org:create -f ./config/project-scratch-def.json -a
MyScratch
• sfdx force:source:push -g -f -u MyScratch
• sfdx force:org:open -u MyScratch
• Do changes in your org
• sfdx force:source:pull -u MyScratch
43. What can I put in the definition file?
AnalyticsSharingEnable
AsyncSaveEnabled
ChatterEnabled
DisableParallelApexTesting
EnhancedEmailEnabled
EventLogWaveIntegEnabled
LoginForensicsEnabled
NetworksEnabled
NotesReservedPref01
OfflineDraftsEnabled
PathAssistantsEnabled
S1DesktopEnabled
S1EncryptedStoragePref2
S1OfflinePref
SelfSetPasswordInApi
SendThroughGmailPref
SocialProfilesEnable
Translation
VoiceEnabled
API
AuthorApex
Communities
ContactsToMultipleAccounts
ContractApprovals
CascadeDelete
CustomerSelfService
CustomApps
CustomTabs
DebugApex
DefaultWorkflowUser
ExpandedSourceTracking
ExternalSharing (not available in Group Edition)
ForceComPlatform
MultiCurrency
PersonAccounts
SalesWave
LightningSalesConsole
LightningServiceConsole
ServiceCloud
ServiceWave
SiteDotCom
Sites
StateAndCountryPicklist
https://developer.salesforce.com/docs/atlas.en-
us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm
45. Transpone data in seconds
sfdx force:data:soql:query -q “SELECT Id, BillingCity FROM Account” -r csv
> accounts.csv
Update the file
sfdx force:data:bulk:upsert -s Account -f accounts.csv -i Id
46. Transpone data in seconds
sfdx force:data:soql:query -q “SELECT Id, BillingCity FROM Account” --json |
jsonv Id, BillingCity result.records |
cat ../data/header.csv - > updates.csv &&
sfdx force:data:bulk:upsert -s Account
-f updates.csv -i Id
If You Can Write a Formula Field You Can Use a Command Line, Petter Chittum,
London‘s Calling
Talk Track:Before I begin, just a quick note that when considering future developments, you should always base your purchasing decisions on what is currently available.
I started my development carreer on Lotus Notes, which was similar to Salesforce back then. No versioning, production was source of truth. Got used to it
Robust, collaborative, source driven development, modern development technique, source of truth, variety of different tools, extensible tools, plugins, command line, continuous integration
Or copy fields between objects – so easy and quick
Used rather reports and import wizard, but there is a quicker way
Import test data which are related to each other is a lot of work. DX can take some work off you
It takes long, you cannot push all changes in one change set, it is hard to maintain when having a lot of changes, ugly as you need to create them in each environment
Anyone with me, that these are your daily struggles and would be great to do them quicker?
I used Eclipse before as I had an experience with it, but as CLI isn‘t supported anymore I‘m moving to VS Code (free)
This thing is to let you edit the files you have offline from Salesforce
Github, Bitbucket, Microsoft Team Foundation
This thing is to version all the things you did, so you can see all those commits and roll back when you need to
Continuous integration for bigger teams
These things communicate with the webservers and do all those things you need
orgPreferences, quick to create, limited lifetime
Just one org which knows about all those other org, so you don‘t have to login again and again
So we installed everything, know some new words and now let‘s put it in action
Have source code online is nice to have, you can survive without it.
Bitbucket, Github and probably plenty others
Or create a package of all your components
Or create a package of all your components
You get a xml with all your components
But you rather want to have the same file with asterix. And if you want to use it for work include just components you work with
If you have a package then include –p PackageName in the retrieve command
More granular, metadata vs dx data
You get a xml with all your components
More granular, metadata vs dx data
-o means ignore errors
Why would you do that? Quick copy & paste of fields between objects, search and replace to update list views, …
Or copy fields between objects – so easy and quick
Start with a convert source, as it is way easier then
-o means ignore errors
-f defines path to definition file, where you can „shape“ your scratch org
A lot, there are features I don‘t even know they exist
Jsonv convert the json file to csv file, cat add a header already specified in the header.csv file
Or
sfdx force:data:soql:query -q "SELECT BillingCity, Id from Account" -u MyOrg -r csv | % {$_ -replace "BillingCity", "OtherCity"} > updates.csv | sfdx force:data:bulk:upsert -s Account -f updates.csv -i Id -u MyOrg
Limit 200 records
You already know the rutine – convert, deploy
I usually do it manually, but this should work. And some dev will probably kill me
You can either revert the whole commit or specific file (2nd option)
I usually do it manually, but this should work. And some dev will probably kill me
You can either revert the whole commit or specific file (2nd option)