Salesforce Stack Exchange Community Digest

Top new questions this week:

Project structure and modular development best practices

I want to stop using the usual force-app/main/default single folder project structure in order to better organize my projects and decouple dependancies. While researching about this practice, I found ...

salesforcedx vs-code unlocked-package modular-development project-structure  
asked by Gabriel Serrano Salas 8 votes
answered by sfdcfox 4 votes

How do I enable functions in my DevHub org?

I have enabled DevHub in my developer edition org. But I am still not able to enable "Salesforce Functions". Any idea?

salesforcedx feature-activation salesforce-functions  
asked by Nagendra Singh 5 votes
answered by Stephan Chandler-Garcia 10 votes

How to avoid System.AsyncException: Maximum stack depth has been reached

I need to consume an API from an external source and insert it in my Enterprise org. I have to retrieve 200 at most in every transaction. I implemented a Queueable Apex class that chains itself in the ...

apex callout queueable-apex  
asked by Marcos Carri 4 votes
answered by sfdcfox 6 votes

Marketing Cloud Journey Builder PB/Flow on Contacts Causing CPU Limit Issues

In our Org, the JBSystemFlow_Contact flow is being called by a Process Builder every time a Contact is saved, and causing us to hit the CPU Governor Limit. I know that CPU limits can come from ...

marketing-cloud visual-workflow journeybuilder process-builder cpulimit  
asked by Morgan Marchese 4 votes

Do additional Permission Sets reduce Salesforce Performance?

I have hundreds of different functionalities setup in Salesforce each with its own Permissions Set for various privleges (FLS, Class access etc), given to various roles across the business. I wish to ...

permissions permission-sets performance architecture permission-set-groups  
asked by NZ Dev 4 votes
answered by sfdcfox 4 votes

Best way to detect that code is running in InstallHandler context?

Implementing an InstallHandler allows a managed package to execute setup Apex code on install or upgrade of the package. I'd like to have some unrelated code - a trigger - behave differently for this ...

apex managed-package package-install postinstall  
asked by Keith C 3 votes
answered by Keith C 2 votes

Information Disclosure Vulnerability

Here is a security vulnerability issue of "Information Disclosure" reported by the Salesforce Team. URL https://yourdomain.lightning.force.com/aura?r=13&aura.DynamicComponent....

security-review issue info-disclosure  
asked by ctrl-z 2 votes

Greatest hits from previous weeks:

What are Salesforce ID's composed of?

I remember seeing somewhere that IDs are composed of a few pieces. I always have a hard time trying to find that information when I'm looking for it. What I mean by the above is that the various ...

salesforce-id  
asked by Ryan Elkins 156 votes
answered by Daniel Ballinger 200 votes

How to check in Apex if a Text field is blank

I'm unsure what's the shortest and most robust way to check whether a Text field is blank / empty? /*1*/ Boolean isBlank = record.txt_Field__c == ''; /*2*/ Boolean isBlank = record.txt_Field__c == ...

apex string isblank  
asked by Robert Sösemann 43 votes
answered by Andree Wille 71 votes

How to truncate a string to a specific length if it is longer?

How can I make it that I can reduce the length of a String? Like for example the string.Length() = 300. My goal is to make it to 120 characters, retaining the left side (e.g. NameOfThePerson to ...

apex string  
asked by imajmdf 10 votes
answered by Oleksandr Berehovskyi 7 votes

Trigger to update parent object value with child value

In my company we are using Oppotunity standard object and we have created a custom Quote object. The opportunity object is the parent and Quote is the child. How has to be the trigger in order to ...

apex trigger update  
asked by Guillermo 11 votes
answered by Doug B 14 votes

Deploy lightning web component is getting failed with error - "--json --loglevel fatal ended with exit code 1"

I am trying to deploy a lightning web component to the org using vs-code but getting the error. Starting SFDX: Deploy Source to Org 10:09:14.43 sfdx force:source:deploy --sourcepath d:\Aakriti\...

salesforcedx lightning-web-components vs-code  
asked by Aakriti.G 9 votes
answered by Manvendra Singh Rathore 19 votes

How to set a Date in apex test class?

I have written a test class in which I just want to set one date field. How can I achieve this? I am not able to set the value using the following code: Account acc=new Account(); acc....

apex unit-test code-coverage date datetime  
asked by uma451 13 votes
answered by Markus Dang - formerly Slabina 26 votes

"Java runtime could not be located" when starting VSCode with the Salesforce Extensions

When starting VS Code (v1.21.1) with the VS Code extensions installed (v40.4) I'm getting the error message: Java runtime could not be located. Set one using the salesforcedx-vscode-apex.java.home ...

salesforcedx vs-code  
asked by Daniel Ballinger 16 votes
answered by Daniel Ballinger 23 votes

Can you answer these questions?

CURL command with --data-raw JSON, Unexpected character error

Hi I need to send JSON format through the CURL command but I am getting an error. curl --request POST "https://app.io/api/graphql?accountId=Xzg" --header "x-api-key: WHpnV=" --...

json curl  
asked by user105835 1 vote
answered by Paul N 0 votes

Users cannot edit "Assigned To" field in Events

Salesforce pushed some updates over the weekend that are causing issues I haven't run in to before. Users are not able to edit the Assigned To field on Events after the changes. The error they are ...

lightning user event calendar  
asked by cking 1 vote

Lookup Field from Custom Object passing User Id, not user name

I have a custom object related to the Account object and when the look-up fields on that custom object get updated it should update all of the associated contact records. Everything in my code works ...

apex  
asked by Lisa 1 vote
answered by sfdcfox 0 votes
You're receiving this message because you subscribed to the Salesforce community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3