Skip to main content
26 votes

Error: SFDX Deploy source to org

If you are reaching this question in July of 2022, there is an issue with the most recent Salesforce CLI Integration Extension for VS Code on Windows. To resolve, go to your extensions, go to ...
Emily Holden's user avatar
16 votes

LWC get url parameters in Community

Another approach with using URL.searchParams: The searchParams readonly property of the URL interface returns a URLSearchParams object allowing access to the GET decoded query arguments contained ...
Oleh Berehovskyi's user avatar
15 votes

SFDX: Create a Default Scratch Org... failed to run

There is 2 ways you can delete the scratch org. First is from UI In Dev Hub, ActiveScratchOrgs represent the scratch orgs that are currently in use. ScratchOrgInfos represent the requests that were ...
Tushar Sharma's user avatar
15 votes

LWC get url parameters in Community

The best way to get params from URL is use CurrentPageRefference. currentPageReference.state allows you to get params. import { LightningElement, wire } from 'lwc'; import { ...
Piotr Gajek's user avatar
  • 2,814
12 votes
Accepted

LWC get url parameters in Community

If the question was if the LWC Framework provide an utility - then no not that i am aware of. Which means you can use every js snippet you will find somewhere in the web like parameters = {}; ...
Renji-xD's user avatar
  • 2,791
10 votes

lwc: sfdx unable to retrieve lwc files

You can even use : $ sfdx force:source:retrieve -m LightningComponentBundle
Hamza's user avatar
  • 307
9 votes
Accepted

System.NullPointerException: Attempt to de-reference a null object: variable initialization statement

The line VS_Design__c nd1, nd2 = new VS_Design__c(); does not initialize nd1 From the Apex doc All variables are initialized to null if they aren’t assigned a value. For instance, in the ...
cropredy's user avatar
  • 72.5k
9 votes

Version Control For Salesforce — Branching Strategy

You should Google and find out more about SFDX and scratch orgs as these tools were designed for "version control first" development. Each developer can create short-lived scratch orgs and ...
Keith C's user avatar
  • 137k
8 votes
Accepted

Can I know lightning component run at Desktop or Mobile?

At least you can access the form factor of the hardware the browser is running on in LWC: import formFactorPropertyName from '@salesforce/client/formFactor'; formFactorPropertyName — a name that ...
Oleh Berehovskyi's user avatar
8 votes

Static Approach in recursive trigger

We need to take measures to prevent recursion precisely because the approach you're suggesting (compare old and new trigger context records) doesn't work. Or, at the very least, it doesn't work in all ...
Derek F's user avatar
  • 63.2k
6 votes
Accepted

Debug logs in developer console?

In the Developer Console, uncheck "Show My Current Logs Only".
Daniel Ballinger's user avatar
6 votes
Accepted

Salesforce Platform Developer II Exam

If you check out Salesforce certification page and click the Platform Developer II tab, you will see the following: A full exam outline can be found in the Study Guide So if you check out ...
Novarg's user avatar
  • 5,284
6 votes

System.NullPointerException: Attempt to de-reference a null object: variable initialization statement

The problem is with with initialization VS_Design__c nd1, nd2 = new VS_Design__c(); It declares nd1 as VS_Design__c but doesn't initialize it. The initialization happens only for nd2 as it is on the ...
Vigneshwaran G's user avatar
6 votes

Chrome Developer Console not working

I too experienced this issue as reported here. If you are using Chrome version 52, try updating to version 53. Many thanks to @plusplusben for finding this fix.
Adrian Larson's user avatar
  • 151k
6 votes

Dev Hub missing in Setup

Dev orgs don't get a Dev Hub. Only prod orgs and Enterprise demo orgs get it. EDIT (September 2018) Dev Hub in Developer Edition is available starting with the Winter 19 release which rolls out in ...
Charles T's user avatar
  • 11.1k
5 votes
Accepted

Logs of other users

You can create user trace flags for your users. Go to Setup -> Monitoring -> Debug Logs -> New Traced Entity Name is your user then create a new log level and adjust log levels as you ...
tugce's user avatar
  • 2,737
5 votes
Accepted

Git: no changes in this file have been detected, or it is a binary file

It sounds like you're using all the default options of the tools you installed, you're using Windows, and the Force.com IDE. The main problem with the default settings is that the API uses the LF line ...
sfdcfox's user avatar
  • 500k
5 votes
Accepted

Journey Builder: how to integrate async results from a Custom Activity in flows & statistics/reports?

To these days creating custom activities is still cumbersome. Alas, lack of really good examples and explanation from Salesforce. Answer or Question 1. --How to communicate these asynchronous ...
Eduard's user avatar
  • 5,181
5 votes

No option to ask a question in https://developer.salesforce.com discussion forums

Before addressing your directly question. Why not ask your question here on the Salesforce StackExchange? The Official Salesforce Developer Forums and this site fill a similar role. The primary ...
Daniel Ballinger's user avatar
5 votes
Accepted

VS Code + sfdx: debug logs

It sounds like you're hitting this bug: https://github.com/forcedotcom/salesforcedx-vscode/issues/1411 VS Code gets its error's from the cli and the cli has only been reporting errors on deploys ...
muchavie's user avatar
  • 491
5 votes
Accepted

Would you mind to advise about next step to be a good developer?

This is very much an opinion, but I suggest you also learn from outside the Salesforce world e.g. 12 Most Influential Books Every Software Engineer Needs to Read. Plenty of great ideas out there. ...
Keith C's user avatar
  • 137k
5 votes

Version Control For Salesforce — Branching Strategy

As Keith C stated in his excellent answer, there are some good sources for detail on use of SFDX, leveraging scratch orgs. My tuppence extra is that selecting git as your VCS is a great choice; many ...
Phil W's user avatar
  • 37.5k
5 votes

How to call object from test setup method to another method?

In normal code, you'd be able to use class variables (static or instance) to hold and access data. If it's static variables, then you could simply access them using ClassName.staticVariableName. If it'...
Derek F's user avatar
  • 63.2k
5 votes
Accepted

SOQL "FOR UPDATE" keyword Understanding

As mentioned in Avoiding Deadlocks, Apex does try to avoid deadlocks by locking parents before children, and by record Id order when editing multiple records (e.g. Apex, Data Loader, etc). However, ...
sfdcfox's user avatar
  • 500k
4 votes
Accepted

Put If condition for displaying repeater OR Not

If iterating over the objmappost for one time is not a problem for you then you can try like, for(String key: objmappost.keySet()){ if(null == objmapcomment.get(key)) objmapcomment.put(key,...
Saumya Ranjan Satapathy's user avatar
4 votes
Accepted

Trying to Authenticate using Username/Password Flow not working

The "useful" part of the exception reporting is the message: retry your request From my Googling, others who have experienced that error have had success in changing the oauth2 url from login. to ...
Daniel Ballinger's user avatar
4 votes

Merge conflict warning in Visual Studio Code and Salesforce Extension Pack

Using the VS Code Salesforce extension pack and their "SFDX: Deploy This Source to Org" command actually uses different deployment methods depending on the org your developing against. As per Develop ...
Brian Miller's user avatar
  • 5,242
4 votes

Decoding pipe symbol in apex

You are actually getting HTML Entities in XML. So, you should use unescapeHtml4(). String str = 'Test | Shift Happens: Test data '; String conStr = str.unescapeHtml4(); System.debug(conStr);
salesforce-sas's user avatar
4 votes
Accepted

Optional parameter in apex (sending email with PDF)

Apex supports method overloading. You can define two versions of this method, which accept a different set of parameters. It's common for one of these versions to call through to the other, which ...
David Reed's user avatar
  • 93.4k
4 votes
Accepted

Set up Git in IntelliJ with Illuminated Cloud

I have a similar setup as you. Using Gearset and Illuminated Cloud. But, I also want to set up VCS within my IDE (IntelliJ with Illuminated Cloud) so that I don't have to make commits via Gearset ...
Kris Goncalves's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible