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 ...
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 ...
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 ...
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 { ...
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 = {};
...
10
votes
lwc: sfdx unable to retrieve lwc files
You can even use :
$ sfdx force:source:retrieve -m LightningComponentBundle
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 ...
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 ...
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 ...
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 ...
6
votes
Accepted
Debug logs in developer console?
In the Developer Console, uncheck "Show My Current Logs Only".
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
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'...
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, ...
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,...
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 ...
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 ...
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);
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 ...
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
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
developer × 346apex × 128
developer-console × 32
visualforce × 27
trigger × 27
administration × 25
lightning-web-components × 24
salesforcedx × 16
marketing-cloud × 14
lightning × 13
certification × 13
unit-test × 12
community × 11
class × 10
lightning-aura-components × 9
soql × 9
javascript × 9
rest-api × 9
visual-workflow × 9
sandbox × 9
integration × 8
managed-package × 7
lightning-experience × 6
admin × 6
ampscript × 5