Salesforce DX offers a unique experience to the modern developers, which further ensures a promising way to build unique Salesforce applications to meet the changing business needs. For individual developers and also for corporate teams, Salesforce DX offers an end-to-end, integrated, agile, and high-performance development model. Few Limitations of Salesforce DX.
However, along with the benefits comes bundled with the package, there can be some known issues also troubling the developers while using Salesforce DX. In this article, we will discuss a few such issues and possible workarounds to try.
1. Salesforce CLI
There is a problem while you try to install Salesforce CLI on Windows machines as you may see a warning by Windows Defender. The message may read like ‘this app will put your PC at risk.’ This message can be very much expected as you update the code signing certificate of the installer.
The workaround is to click ‘Run’ by ignoring this warning.
2. Unable to import Record Types
Sometimes, running the command as ‘data:tree: import’ through Salesforce CLI will return the message ‘We don’t support RecordType.’
In fact, there is a workaround for this now.
3. Limited support for Windows Shell Environments
The Salesforce CLI is said to be tested for the Command Prompt and also Powershell. In fact, there are noted issues at Cygwin and also Min-GW environments. There are issues noted with WSL (Windows Subsystem for Linux) environments too. We may expect all these environments also may get supported in future releases.
The workaround as suggested by Flosum.com, for the time being, is to make use of a supported shell.
Also, Read: How To Use Technology To Grow Your Business?
4. Failing to execute force:apex:test:run
Noted that in some situations the command as ‘force:apex:test: run’ won’t execute. Some situations include compilations errors in Apex test, or the test triggers some pre-compile while another test is in progress. This case is largely reported by the Salesforce CLI users and Salesforce developers.
The workaround for this issue is to seize the command execution with ‘control-C.’ If this command comes as a part of any continuous integration tasks, then it is ideal to set environment variables as
5. Scratch Orgs
It is reported as an issue that sometimes Salesforce CLI may not recognize the Scratch Orgs. This is not so in all the cases, but in many instances, Salesforce CLI will not acknowledge the creation of scratch orgs with the ‘Communities’ feature. Even when you see that the scratch org is listed at Dev Hub, one may not be able to open scratch org.
You may try below workaround for this issue; however, this may not work well in all the cases. First, delete scratch org in the Dev Hub and create a fresh scratch org through CLI. In fact, deletion and recreation of scratch orgs may count against the scratch org limits one has.
6. Deploying a community
Sometimes, an error occurs while you pull and deploy a Community. It is noted that this error primarily occurs as the scratch org doesn’t have the needed guest license.
The possible workaround is to specify all feature communities at the definition file of scratch org as well as to specify site features.
Above mentioned are just a few limitations fresher to Salesforce DX may experience and we may be discussing more of this sort of issue in the forthcoming articles too. Few Limitations of Salesforce DX.