Salesforce DX experience on real project

Salesforce DX is here for a while and enough has already been said and written about it. Even I spoke at Dreamforce how cool it is for admin. Finally I had an opportunity to use it on real project, with several consultants and developers and really see how it works and what are the challenges you might expect.

There were plenty of them, some of them probably because of our processes, the others most likely due to DX/Git philosophy.


DX is not linked with the need of source code versioning, but it makes sense, especially when linked with CI/CD.

Continuous Integration process

For us, as consultants who are used to the idea „your org is yours source of truth“, it was something completely different. You should create a new branch for each story (what should be story, is creating two fields on the same object one story or two, what about field and list view?), then push it to scratch org, do changes, pull, push to git and merge at the end. Doing it for adding one new field is like a lot of extra work.

I have a feeling that during our first sprint I lost more that 50 % of my work because some other change rewrote it in repository, which was something I didn’t really expect. And we still fight the whole git process, merging changes again and again as more branches are merge into the main one. It isn’t enough to merge changes when you do the pull request as there might come other pull request before yours and create a conflict again.

I spent about 5 % of my time on requested changes and 95 % fighting the Git.

(unnamed colleague)

It is better sprint to sprint, but still sounds like a lot of extra work considering the fact that we hardly roll-back. And I still don’t care
(read don’t know anything) about all those cherry-picking, revert of commits and so on.

Scratch orgs

At the beginning we didn’t care much about the project file from which new scratch orgs are created. But at the back of my head was that strange scratching – everyone said they spent a long time doing this right, why it was so easy to us?

And it hit us later on, as you might imagine. I still hate the fact that you cannot enable all features in this file (looking at you News and Logos), as you need to think about it, so when you push changes to scratch org and pull back you don’t loose something.

At the same time it was great – for a few hours. We needed to add platform licences and related profiles. Thanks to scratch org it was done in a few minutes, pushed to git repo and our build has been broken immediately for later changes as well. Of course it solved itself later when we got the licences, but you need to think about it.

Salesforce DX command line interface

I still hate to touch profile, as we get the EditReports permission from scratch org, but in our production org it is named CreateCustomizeReports. Seriously Salesforce?

Something similar is with ProfilePasswordPolicy and ProfileSessionSettings files, which you get when creating new profile, you can push it to production for the first time but get errors later on. Time to delete them from repo, which probably isn’t the right way.

holly molly kurwa drát

me, when I found out that because some feature isn’t activated in my scratch org the related elements will be deleted from the component when I’ll push to git

AllowUniversalSearch, enableAccountOwnerReport and a few others are still bitting us.

How should we tackle case-to-emails and similar functionality, which refer to existing users, which doesn’t exist in QA or production org?

We also experience the errors that you loose field level security, luckily it has been solved with the Spring ’19 release.

Non metadata changes

Of course not everything can be transferred via metadata. What I like, as I feel I can „decrypt“ the DX file format, is that you have an idea what won’t be transferred and can do changes manually, while with change sets I never was sure what will and won’t be transferred. I’m pretty sure somewhere is a list of all the things which aren’t transferred via metadata, but who should remember where. (not sure this is the right list)

For example the mobile app branding isn’t transferred via metadata, but the logo (as a file) is. But I cannot chose it when doing the branding again in production, so … should I push it to repo or not, when I have to choose it from local drive anyway?

Is it worth it?

That’s the crucial question.

I like that we are able to find out when something has been changed or deleted, that we can „pack“ (commit) the whole pack of related changed and put description why it has been done. I feel this adds some kind of quality to the whole process.

I like that I can do a lot of changes quickly in text files rather than clicking it slowly in the Salesforce interface. That I can see right in the code who changed it, when and why (thanks to the right extension for Visual Code).

I hate that I don’t know about changes other people do at the same time. For example we had one story to change home page and another to add some design element to home page (they weren’t part of the same story as the second was related to other story where it makes more sense). As we worked on it at the same time I wasn’t aware that my colleague did a change to home page and he didn’t know I wanted to be safe and created a new version of it. And the end my story passed tests (because it had all elements which should be there) and his failed (because the element did’t show up on my homepage which was active by then), while would we know about each other’s work my story would fail (because it had extra element not part of the story) and his would pass. The testing is still strange world to me.

I hate that DX is so slow on our machines, which is something we try to solve with our IT department. But every command I run takes 20+ seconds, so it is really annoying and I try to minimize them as much as possible.

It works greatly with Scratch orgs, with normal instances it still feels like a lot of work to get the metadata (you have to have package.xml file or create a package or name elements you want to get, those names are case sensitive and not related to directory they are saved, so it might be hard to find the proper word). Besides all that I have a great feeling and consider it as a great step towards better implementation.

Updates (look like this post might be updated with new findings)

24. 2. 2019

  • one great thing about Salesforce DX – community can extend it. So we solved the problem of wrong permissions (
    AllowUniversalSearch, etc.) with plugin from Nicolas Vuillamy
  • easy way how to install package right when creating Scratch Org is to create a directory installedPackages, where you put one xml file for each package you want to install. The filename is in a format of namespace.installedPackage-meta.xml and its content is following (be careful about versionNumber, that’s the only thing to change)
 <?xml version="1.0" encoding="UTF-8"?>
<InstalledPackage xmlns="" xmlns:xsi="">

5. 3. 2019

  • Before you change a matching rule, you must deactivate it. – I somehow hoped that the CI would solve all this without touching the org at all 🙁

20. 3. 2019

  • looks like it is impossible to push changes to Entitlement processes when they are used (means there is an Entitlement record with link to that Entitlement process, remove the process from the record, not delete the record);
  • renaming record type and downloading metadata doesn’t necessary download all of them – we had to change path, quick actions and some profile manually 🙁

9. 4. 2019

  • only one dynamic dashboard allowed;
  • problems with reports & dashboards sub-folders as they aren’t visible in scratch org, but you can draw the reports/dashboard there manually later on and the dashboard picks up the correct reports;
  • when moving reports & dashboards between folders they stay in the old folder as well on your local drive.

9. 5. 2019

  • looks like dashboard folder security is always reset after deploy, the same goes with roles/group membership (different IDs);
  • every time you download a dashboard and push it to repository you need to think about deleting the running user info, as it is random user who doesn’t exist elsewhere.
Napiš komentář, díky!

Spring ’19 Release Notes Summary

That time of the year is here again, would you run out of books from Christmas, you can read through release notes. What I found in them and liked a lot?

Top features

In Winter ’20 (October 2019) Salesforce will start switching users to Lightning at all orgs. I mean all, where users have the Lightning Experience User permission which is enabled by default in all standard profiles.

Pinned Lists – we still cannot setup which view will be default by admin, but at least users can pin the most important view for each object at it will be opened when they click on the tab.

Extra data space – this one is big for a few of my customers. The default 1GB of data storage was too low for them, now they can enjoy 10GB by default. Where is that aplaus gif? (will be applied to instances in late March)

New Flow Buider – say good to that old Flash thing and enjoy new, simplified and sexy tool with new features. What about „Additional text input“ on picklists?

Sales Cadence, where you just setup which activities should follow and in which order and Salesforce do all the magic of getting in touch with your contacts. (at extra costs 🙁 )

Field History Data will be deleted after 18 months. The 18 months limit wasn’t enforced till now, but starting with Spring your data field history data (history of changes you made to up to 20 fields per object) will be deleted. You have to buy Shield to get longer history (about 30 % of licence price).

I never really liked Salesforce Essentials, but as it now includes Sales and Service for one price and you can add and remove users, it looks cool. And price is ok compared to others.

New reports screen – the Enhanced Run Page from previous release is now the standard, which allows for drill down, sticky column headers, you can resize columns and have stacked summaries, so you don’t waste precious space on your reports. We also got 12 columns on dashboards as well as compact components, so we can put more info on the same space.

Other features

  • you can customize which links will be under the help menu on top of page;
  • printable view – a few customers asked, how they can print from Salesforce, now they will able to;
  • Lightning Scheduler, which allows you to select times when you can meet with customer and they can choose, looks super cool, paid extra;
  • pop-out items from utility bar. Utility bar can be handy – but I usually have problems to find what should be there as it is really crucial for users – and not you can pop-out these things to another windows and extend your workspace. Just imagine the CTI phone on another screen;
  • add people to groups and queues by territory – finally looks like all the different part clicks together and you don’t have to assign your users at different places;
  • the product list when adding products to opportunities will be more condensed;
  • Enforce Email Privacy setting, which respects when customers opt-out from your emails. Looks like this section in setup is pretty cool and you really should set it up. Plus new Consent Management Object;
  • add attendees to events without setting up Lightning Sync, aka we are finally able to add attendees in Lightning! And other improvements to calendars such as showing more info, using colors;
  • Permission Set Groups – assign more permissions at once and don’t forget any (pilot);
  • switch Lightning Page to other template, no need to start again from scratch (will that be possible for reports anytime?)
  • default home page per Lightning App, not one per org!
  • you can use relative dates in macros;
  • live agent supports offline mode (meaning all your agents are offline and customer can still open the case);
  • Where is it used (beta), so you have an idea where field is used – validation rules, layouts, formula fields, VF pages, … the list is pretty long.
Example page of field references.
  • Login Discovery, so users just enter what they know (phone number, email) and the system redirects them to their identity provider page;
  • authenticate users with certificates for better security and user comfort;
  • asynchronous email verification for new community users, so they can start their use even before clicking the confirmation link in an email;
  • contactless external identity user, so you don’t have to create contact record for each community user. And it also says something about chance to downgrade for another licence (no idea).

Process Builder and Flows

  • you can specify processes and flow in your managed package as templates, so customers can update them;
  • processes can now respond to standard platform events, such as errors = might be easier to handle errors and do some additional actions on them;
  • display images in your flows and capture addresses, which uses the standard country/state picklist values;
  • support for external objects – lookup, create, update. And even launch process, but that has to be done with platform event;
  • Return Null Values in Process and Flow Formulas critical update which makes sure that the returned value is always true – would this solve the ugly need for checking whether all fields in hierarchy are null and just then check the value of the last one?
  • scheduled actions can be tested with APEX as they are processed immediately when calling stopTest();
  • Guided Actions will be setuped in Setup, not on the component anymore. And there is a converter to do that.


  • business units in Pardot to segment what users can view;
  • selective sync between Pardot and Salesforce – no more you have to have all contacts in Pardot.

Field Service Lightning

  • FSL can show IoT Data about your product;
  • booking appointments in Field Service Lightning just got a dialog which makes more sense (rather than scrolling through long list of options).

Einstein Analytics

  • Google Analytics connector for Einstein Analytics – now you can get those two together;
  • event based scheduling your dataflows in Einstein Analytics;
  • Smart Dashboard Templates in EA – not only Salesforce provides app templates, the AI is able to generate dashboard and all its components just from data you provide. Scary, especially would it be better looking than my work;
  • Share Einstein Discovery Stories to Quip or R for data scientists.


  • Translate with Google in Community Chatter Feed;
  • moving feed items between groups, including all replies etc.
  • you can set which options are available on list views in communities – would I be finally able to get rid of those buttons which don’t make sense?
  • Partner Account Relationship and sharing rules sounds interesting and as a way how to simplify the sharing of data with partners. For accounts, contacts, campaigns, cases, leads, opportunities, orders and custom objects.
  • community guests users can now upload files – that was one challenge we experienced during our NGO hackathon, glad it is now supported (don’t remember why we wanted it anyway);
  • links in Chatter posts (why am I so excited from things which looks completely normal?);
  • Next Best Action looks like a standard feature, need to find someone who can benefit from it.


  • Lightning Web Component is probably the biggest thing – say good bye to Aura components and say hello to LWC, which you cannot develop right in Salesforce environment but have to use some other editor (VS Code for example). They use more of todays browsers‘ native features making them faster and also allowing „regular“ front-end developers to quickly learn them and be productive;
  • unsaved changes component, which might be handy for users (check Keir’s blogpost about it);
  • WITH SECURITY_ENFORCED for SOQL queries if you don’t mind it fails down;
  • using custom metadata for setting up default values of fields;
  • new object AccountRelationship – we can link two accounts together?

Still want more? Check these resources

Napiš komentář, díky!

Čtyřhodinový pracovní týden, Timothy Ferriss

Tuhle knížku jsem přečetl před rokem, pár věcí si z ní odnesl a zkusil nasadit. Ostatně, když mám čtyřdenní pracovní týden, proč ho nezkrátit ještě víc.

Čtyřhodinový pracovní týden, Timothy Ferriss

Tedy popravdě si nemyslím – a tuším, že Tim to někde píše – že by pracoval jenom čtyři hodiny týdně. Ano, hodně si užívá. Ale současně ten čas zaplnil dalšími novými věcmi.

Co si budeme povídat, rodina a prckové jsou fajn, pár let jsem s nimi doma byl, ale asi i proto vím, jak důležité je být občas také někde jinde. A pravdou je, že minulý rok se mi do toho pracovního týdne vešlo věcí nějak víc než rok předtím, takže ty rady možná trochu fungují. Kdybych absolvoval všechna ta cvičení, která Tim v knize doporučuje, tak by to bylo asi ještě lepší, ale na to jsem příliš pohodlný.

Spousta těch věcí, které v knize zmiňuje, mi přijde za hranou korektnosti, byť se kvůli nim asi nedá ve skutečnosti moc vztekat. Vyhrát zápas díky tomu, že soupeře opakovaně vytlačí z hracího pole, místo aby s ním bojoval. Emailové adresy, na které zákazníci píší požadavky a které jdou rovnou na jeho dodavatele, takže on s tím nemá práci (pecka), ale zákazníci ani netuší, že to ve skutečnosti nedělá on. Virtuální asistentka, kterou používá i k tomu, aby se své přítelkyni omluvil, že na ní nemá čas. Uff.


Tim má proces, zkráceně DEAL. Definice, Eliminace, Automatizace, Liberation (osvobození).

Definujte si, co chcete; co byste dělali, kdyby se něco stalo; co se stane, když něco neuděláte; co, co, co.

Eliminujte. Time management ve skutečnosti není tak důležitý, stačí aplikovat Paretovo pravidlo 80/20 a eliminovat ty věci, které vám zabírají čas a vlastně nejsou důležité. Asi to bude nepříjemné, možná díky tomu začnete být závislí jenom na jednom či dvou klientech, ale ušetříte 80 % času a starostí. A to za to – možná – stojí.

Pracovní doba od 9 do 5 je jenom takový úzus. Sám se o tom přesvědčuji pokaždé, když ji porušuji. Stejně jako o tom, že práce je přesně tolik, kolik je na ní času, že když vás někdo neruší tak ji zvládnete za zlomek času a když nebudete zvedat telefony a čas od času zavoláte zpět, tak se vůbec nic nestane. Pořád s láskou vzpomínám na klienta, který během té hodiny, než jsem zavolal zpět, své problémy vždy vyřešil sám a jenom jsme probrali, zda to udělal správně.

Takže které aktivity škrtnete, které jsou jenom pro vyplnění času a získání pocitu produktivity (zní to hloupě, ale 100 Days of Trailhead přesně něčím takovým může být, přesto ho dělám) a které byste dělali, kdybyste mohli pracovat jenom 2 hodiny denně. A kdyby to byly 2 hodiny týdně?

Nasaďte informační dietu – dřív jsem každý den probíral v RSS čtečce pár set blogů a sledoval novinky, teď sice sleduji Twitter, ale co mě na něm neuhodí do nosu, to nečtu. Žádné noviny, iDnes, novinky ani nic jiného. A nějak nemám pocit, že bych o ty opravdu důležité informace přišel nebo že by mi něco chybělo.

Delegujte. O tom ta kniha celá je a já se to pomalu učím také. Vždy mi přišlo škoda platit někomu jinému za něco, co můžu udělat sám. Až jsem před Vánocemi chtěl poslat email s nabídkou do všech domovů důchodců v ČR. Seznam existuje, ale stránkuje po 10 a těch domovů je asi 600. O 3 minuty později byla poptávka na Upwork, za půl hodiny jsem proběhl nabídky, jednu vybral a odpoledne jsem měl seznam hotový a byl o 20$, které jsem nabídl, chudší. A stálo to za každý utracený dolar.

Když delegujete předejte i pravomoci. Tim dal povel, že pokud spokojenost zákazníka bude stát do 100$, ať dělají jak uznají za vhodné. Lidé pravomoc přijali, Tim měl o spoustu řešení méně a ve finále ho to nestálo skoro nic.

Zmizte. Tahle část se mi líbila nejvíc. Všichni mají pocit, že tohle všechno jsou pohádky, protože … a těch důvodů je spousta. Přitom stačí požádat o home-office, ověřit si, že to funguje a pak ten počet dní doma pomalu natahovat. A když budou výsledky, tak bude i vůle.

Jasně, i mě se to říká snadno, šéfa mám normálně 600km daleko, takže přesunout se na hory a mít ho 1 200km daleko už bylo jedno. Ale za zkoušku to stojí.

Staňte se expertem

Tohle byl další z příkladů, který mi byl proti srsti. A Robertu Vlachovi v jeho knize Na volné noze také.

Stačí se stát členy několika organizací z oboru, přečíst pár nejprodávanějších knih, udělat krátký seminář na univerzitě zvučného jména, nabídnout článek časopisům a zaregistrovat se na serveru ProfNet, který prý novináři hledají experty.

A pak už můžete o sobě tvrdit, že jste přednášeli na vyhlášené univerzitě nebo vám nějaký solidní časopis otiskl váš článek.


Minidůchody, zánik tradiční dovolené, pomalé a dlouhé cestování. O tom vlastně píše už TravelBible, kterou ke čtení také doporučuji.

Protože většina lidí se honí za penězi, aby mohli našetřit a pak si užívat. Jenže pak už na užívání budou staří, takže je asi lepší začít si užívat rovnou a třeba levněji. A co si budeme povídat, život ve spoustě zemí vás vyjde levněji než u nás a to kouzlo vydělávat v drahé měně a utrácet v levné asi všichni chápeme.

13 nejčastějších chyb

Takovéto jak sklouznete zpět k původní rutině, protože jste zapomněli, proč jste ji opouštěli. Zvláště tyhle se mi líbily:

  • sny blednou a o slovo se hlásí práce pro práci;
  • vracíte se k mikromanagementu a častější kontrole emailů;
  • řešíte věci, které jste outsourcovali;
  • pomáháte lidem se stejnými problémy víckrát;
  • honíte zákazníky – zvláště ty nekompetentní – i když máte dostatečný příjem;
  • odpovídáte na emaily, které nevedou k prodeji;
  • neprovádíte každé 2 – 4 týdny důkladnou analýzu 80/20;
  • usilujete o dokonalost místo abyste se spokojili s dostatečností;
  • ignorujete sociální stránku života.


Podle mě je ta kniha skvělá na otevření očí. Spoustu těch věcí vám na začátku přijde opravdu trapné dělat, ke spoustě z nich se možná postupně vrátíte. Žít přesně podle ní bych nechtěl, mnoho z toho je za hranou, další jsou zajímavé myšlenky.

Za přečtení ale stojí, když k tomu připojíte Travel Bibli, tak si myslím, že se vám ty oči otevřou hezky. A otázka je, kam se pak podíváte.

Čtyřhodinový pracovní týden prodává třeba Martinus, Travel Bibli nejlépe přímo od kluků.

Napiš komentář, díky!

Nonprofit Cloud Consultant Certification

Just over Christmas period a new certification hit Webassessor – the Nonprofit Cloud Consultant. Sadly I wasn’t one of those who were invited into the beta, so it was first thing on my list for January.

Nonprofit Cloud Consultant certificate

It is really great to see this exam, as it shows the importance of NPSP and that Salesforce is really dedicated to support nonprofits. And the exam isn’t about NPSP only but there are links to other products useful for NGOs as well. Actually, I was a bit surprised it spoke about Pardot and Marketing Cloud only, I can imagine that Einstein Analytics would provide a great value as well, not mention Communities or Quip. And platform, that awesome thing under everything!


For a long time I had a feeling that NPSP is community effort with a few people working on it in their spare time. Later I’ve been told there are a few hundreds developers inside Salesforce(.Org) working on it as their daily job.

This package – or rather several managed packages – sits on top of regular Enterprise Salesforce, provides functionality tweaked for NGOs use and is update every two weeks. Which is pretty awesome and at the beginning it scared me, but then they told me it is probably better, as they add a feature or two every 2 weeks, which is easy to set up and deploy. Way easier than to go through 500+ pages every 4 months as with standard Salesforce.

I would love to be able to easily transfer some of its features to any standard implementation:

  • customizable rollups – they aren’t just simple rollups you can get with any 3rd party app, they might be quite clever as well, such as how many consecutive years the donor donated. And it is awesome to see how they are developed (which is another awesome thing about NPSP as its source code is available for anyone to check);
  • Engagement Plans – pretty impressive automation and maybe even „project“ management you can use right out of the box.

Other nice features of NPSP

  • relations between contacts and companies, which are way more powerful than the standard one. At the same time I feel they might be useful only for smaller NGOs as the big one won’t be able to get this level of details plus it is really hard on data space it will use;
  • households might be useful for any company working in B2C space as it solves the problem we typically solve with Person Accounts (which aren’t supported in NPSP);
  • address management probably isn’t that big topic for normal company, but it is nice to see it here. And I can imagine that any magazine would love to use it;
  • donations is the most important part of NPSP for most NGOs. I love how they though about the ability to forecast donations, which is something I didn’t see any of my organisations doing, I love the hard/soft credit idea and matching gifts implementation.

With 35 000+ NGOs using Salesforce worldwide it is really great to see this certification on the market. The only „sad“ part of it is, that you are able to pass it with only standard Salesforce knowledge, which feels sad to me, as I know people who just hate NPSP and their first step in any NGO’s implementation is to remove it, instead of trying to understand what it does and how it works. And they being able to deliver even better implementation.

Would you like a great list of topics to learn, here is a dedicated page full of links to other resources.

Napiš komentář, díky!

100 dní s Trailheadem

O „iniciativě“ Ladies be Architects jste už asi slyšeli. Pokud ne, tak je to velká škoda a já byl málo hlasitý, protože tuhle věc stojí za to sledovat. Vykopla ji Gemma Emmett, když se začala připravovat na CTA a zjistila, že architektů je po světě necelých 300 a maximálně 20 z nich jsou ženy. A pak se to začalo nabalovat, v dnešní době je ve skupině na Trailblazer komunitě přes 1000 lidí. A nejsou to jenom ženy, i muži jsou vítáni – byť se asi cítí podobně jako ženy na typické IT konferenci.

Pravidelné webináře nad jednotlivými oblastmi CTA zkoušky už jim nestačí a tak od 1. ledna vymysleli akci 100 dní učení:

  • každý den po dobu 100 dní alespoň hodinu učení denně – je jedno zda na Trailheadu nebo psaní vlastní aplikace;
  • každý den tweet s tagem #100DaysofTrailhead pro sledování postupu;
  • nebojte se zahrnout přátele, bude to větší legrace.

Loni – nebo to bylo už předloni? – udělal podobnou akci Sergey Erlikh, ale tam to byla jedna Trailhead badge denně po dobu jednoho měsíce.

Tohle je třikrát delší, hodina denně, žádná legrace. Už jsem to chtěl vynechat, protože se přeci nemusím účastnit všeho, ale konec akce vychází na 10. dubna, takže je jasné, že se musím zúčastnit také. Ale co si budeme povídat, každý den mi asi hodina nevyjde, tak snad nebude vadit, když si občas udělám pár věcí do zásoby. Nebo jo?

Na druhou stranu se prý mohou přidávat další tagy, takže #100DaysofSkiing to jistí. Jupí, už jenom pár dní a začne to letos zase!

Napiš komentář, díky!