function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Travis Lee 1Travis Lee 1 
When checking this challenge, I get an error stating that the quickContact Lightning Component could not be found. Including screenshots of the steps I took thus far. Any advice would be appreciated!

1. The Lightning component must be named quickContact (this comes as part of the package, confirmed in picture below)
User-added image

2. Create a new action with Label Quick Contact and Name Quick_Contact on the Account object that invokes the quickContact component. (confirmed in picture below)
User-added image
3. Add the appropriate interfaces to the quickContact component. (Hint: there are two.) (used the implements force:lightningquickaction AND the force:hasrecordid on line 1, confirmed in picture below)
User-added image

4. Add the action to the Account Layout page layout. (added in picture below)
User-added image
Best Answer chosen by Travis Lee 1
SandhyaSandhya (Salesforce Developers) 

Please check if you have connected to same DE org where you have done  your work in the trailhead.To do this click on" launch your hands on  org" and select the DE org or trailhead playground where you have your work and then check challenge.


Go to Trailhead Profile -- settings -- make the DE org which you have worked as default then check the challenge.

Please refer below link how to take challenges in trailhead.

Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards

The following formula will calculate the number of working days (inclusive) between 2 dates. A working day is defined as Monday to Friday. Even if the start or end dates are a weekend, these are accommodated.

IF(AND((5 - (CASE(MOD( Start_Date__c - DATE(1900, 1, 6), 7), 0, 0, 1, 5, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 0)) < (CASE(MOD(  End_Date__c  - DATE(1900, 1, 6), 7), 0, 0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 0)) ),
((( End_Date__c  -   Start_Date__c ) + 1) < 7)),
((CASE(MOD(  End_Date__c  - DATE(1900, 1, 6), 7), 0, 0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 0)) - (5 - (CASE(MOD(  Start_Date__c  - DATE(1900, 1, 6), 7), 0, 0, 1, 5, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 0)))),
(((FLOOR((( End_Date__c  -  Start_Date__c ) - (CASE(MOD(  Start_Date__c  - DATE(1900, 1, 6), 7), 0, 0, 1, 6, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 0))) / 7)) * 5) +
(CASE(MOD(  Start_Date__c  - DATE(1900, 1, 6), 7), 0, 0, 1, 5, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 0)) +
(CASE(MOD(  End_Date__c  - DATE(1900, 1, 6), 7), 0, 0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 0))))

The Start Date and End Date fields are custom in the above example and can be replaced as required. If use of a DateTime field is required then the DATEVALUE function will be required.

I also recommend a simple field validation rule is added to check that the End Date is after the Start Date.
Best Answer chosen by Admin (Salesforce Developers) 

This formula seems to work when calculating bt 2 different days. What about taking into account for same day and returns result shoud be a "0"? My result shows a "5" when I entered 9/10/09 and 9/10/09 for both start and end dates. Is there one formula that can include this possiblity?







We have an application that we distribute as a managed package. In the dev org where I created the package, I can see all output from my System.debug() calls in the system log window. 


When we install the package in a client's SF org, we can't see any of the System.debug() output. We do see the SF profiling information, but no debug() calls.


I can't find any reference to this in the documentation. 


- Is this known behavior?


- Is there some way to enable System.debug() output in a managed package?


thanks for any feedback,


Best Answer chosen by Admin (Salesforce Developers) 
This is known behavior.  The only logging that is performed for a managed installed package is logging that relates to DB statements or governor limits.  There is currently no way to enable other types of logging in a subscriber org.
Vidya BhandaryVidya Bhandary 
I have a 2 level parent child relationship and I am trying to use  a SOQL query ... SA (child) --> SQ  --> S. There is a one to many relationship between SA to SQ and SQ to S.

When I give a query like this ... I get a response but the last field with 2 relationships does not display anything - only [object Object] [ Am currently just trying in the Developer Console to get my query right ]

Select SA__c.Id, SA__c.Name,


from SA__c where
SA__c.SQ__r.S__c = 'a0Hi0000009S5jcEAC'

So I checked adding a field like this in the SA object and it gets displayed just fine !!!!
Best Answer chosen by Vidya Bhandary
Does the object named 'S' have a custom name field? 

If're right, it is curious that this is not found. 

If not, then my first guess is that you need to drop the __c suffix and select the field as such:

If neither of those fits, then would you mind furnishing some additional information: 
1. Are you able to execute the query?
2. Are you receiving an error? 
3. What is the error you are receiving? 
4. Does the query execute successfully but not return any value? 

Answering these questions could help with some of the ambiguity of your initial question. 

Finally...just a suggestion...there is no need to explicitly name the object that is being queried in the FROM clause when you select fields. So a more simple form of your query would have been a little easier for me to read: 

SELECT Id, Name, SQ__r.Name__c, SQ__r.S__r.Name__c FROM SA__c WHERE SQ__R.S__c = 'a0Hi0000009S5jcEAC'
Girijesh GowdaGirijesh Gowda 
Hi Team,

I'm currently using the Simple Email API (/services/data/v58.0/actions/standard/emailSimple) for sending emails. I'm passing "emailTemplateId" (Template Id), "recipientId" (ID of a Contact), and setting "logEmailOnSend" to true. However, every time I try to test, I receive the following exception:

"errors": [
        "statusCode": "UNKNOWN_EXCEPTION",
        "message": "An error occurred. Try again, or contact Salesforce Customer Support and provide this error ID: 1057582836-221577 (1125190724)",
        "fields": []
Even when I test with only "emailTemplateId" and "recipientId," the same exception occurs.

I've attempted this with multiple accounts, but the result is the same. When I try with version 57 and lower, I get the following error:

        "statusCode": "UNKNOWN_EXCEPTION",
        "message": null,
        "fields": []
I'm not sure what's causing this issue. Could someone please help? Your assistance would be greatly appreciated.

Thank you.
Best Answer chosen by Girijesh Gowda
HarshHarsh (Salesforce Developers) 
Hi Girijesh,

Please follow the workaround given in the below-known issue link.
Please mark it as Best Answer if the above information was helpful.

I was trying to authorize my org but I got this error. So I googled what this might mean but it says to update my sfdx. I did try updating it but got the same error
C:\Users\username\AppData\Local\sfdx\client\bin\..\7.209.6-8ba3197\bin\sfdx.cmd"' is not recognized as an internal or external command, operable program or batch file 
User-added image
Anyone who have idea on this? Thanks! 
Best Answer chosen by Jessanel
SwethaSwetha (Salesforce Developers) 
HI Jessanel,

As mentioned in, 
1. Verify if salesforce CLI is installed successfully or not. If Salesforce CLI is already installed, check the version number by running the command "sfdx --version" in the terminal. Make sure it is the latest version.
2. Add the path of the Salesforce CLI to the environmental variables.

If updating Salesforce CLI does not fix the issue, try deleting the sfdx folder located at "C:\Users\username\AppData\Local\sfdx" and then reinstalling Salesforce CLI.

If none of the above steps work, try restarting VS Code and your machine.


If this information helps, please mark the answer as best. Thank you
Angela Skenderi 2Angela Skenderi 2 
  private Decimal getCarAllowances() {
    Decimal value = 0;

    for (Pay_Element__c payElement : payElements) {
      if (payElement.Is_Addition__c && payElement.Car_Allowance__c) {
      value += payElement.Value__c;
    return value;

Logical operator can only be applied to Boolean is the error I receive for this method. 

  private Decimal getCarAllowances() {
    Decimal value = 0;

    for (Pay_Element__c payElement : payElements) {
      if (payElement.Is_Addition__c == payElement.Car_Allowance__c) {
      value += payElement.Value__c;
    return value;

Comparison arguments must be compatible types: Boolean, Decimal is the error I receive for this one.

Best Answer chosen by Angela Skenderi 2
Arun Kumar 1141Arun Kumar 1141
Hi Angela,

Try below code 
private Decimal getCarAllowances() {
    Decimal value = 0;

    for (Pay_Element__c payElement : payElements) {
        if (payElement.Is_Addition__c == true && payElement.Car_Allowance__c > 0.0) {
            value += payElement.Value__c;

    return value;

Please mark it as best answer if it helps

Satishkumar S 14Satishkumar S 14 
My Org users stopped receiving email notifications for chatter @metions. Email notifications are working fine earlier. "Chatter email notification setting" are look good. Email deliverability settings also is set to "All emails". Thanks
Best Answer chosen by Satishkumar S 14
SwethaSwetha (Salesforce Developers) 
I think this is related to Winter'24 release over the weekend. As per , Salesforce enforces this update in Winter ‘24 to follow the latest security recommendations. Administrators must provide a Chatter email From Name and Email Address for Chatter email notifications to continue being sent.

Can you follow the below steps:
Setup > Chatter > Email Settings > Add your name and email address.

You will receive email verification. After verifying your email address, the issue will be resolved.

If this information helps, please mark the answer as best. Thank you
Frederick BunaoFrederick Bunao 
I am a new-ish Salesforce admin coming from PLSQL work.

I'm aware of using apex to query records, put in a list, use a for loop to change attributes, then update the records in the list.

In my previous life when we needed to do mass updates, we just do an update where statement. Is this possible in Salesforce? And if not, I'd like to know if there is a technical reason behind it. Purely so I can better understand the infrastructure too. I'm currently the only person in the team who has gotten into Salesforce and I'm trying to be able to communicate why we can't or shouldn't do certain things on the platform the same as we do with our custom database. (like have thousands of lines of database logic for automation)
Best Answer chosen by Frederick Bunao
SwethaSwetha (Salesforce Developers) 
HI Frederick,
There is no way to directly use DML statements to manipulate records in Salesforce. This is because Salesforce uses a multi-tenant architecture, which means that multiple customers share the same physical infrastructure. This architecture allows Salesforce to provide a scalable and affordable platform for its customers, but it also means that there are certain restrictions on what customers can do.

To perform mass updates in Salesforce, you should use programmatic approaches like Apex (similar to PL/SQL) or declarative tools like Flows. These tools are designed to work within the Salesforce platform's architecture, allowing you to update records in a controlled and efficient manner while respecting the platform's security and governance measures.

- You can perform bulk updates using Salesforce's Bulk API(dataloader), which is designed to handle large volumes of data. 
- You can use batch apex which allows you to batch process DML statements. This means that you can group multiple DML statements together and execute them as a single operation. This can significantly improve the performance of mass updates.
- Asynchronous programming allows you to perform DML operations in the background.


If this information helps, please mark the answer as best. Thank you

Hi everyone-


I believe I'm coming pretty close to finalizing my apex code.  Unfortunately I'm getting a compile error and could use some help.  I have included comments within the code to show exactly what I'm trying to accomplish.  Can somebody please take a look and see what modifications need to be made?


trigger LastSWDate on Task (before insert, before update) {
	//To do - If the subject of a completed task contains "SW", put the date of the completed task in the 
	//the "Last_SW_Activity__c" field on the account object

//Create a set of related account ID's
Set <ID> acctIDs = new Set <ID> ();

//For every task, add it's related to account ID to the set
	for (Task t:{
//Create a map to match the task related to ID's with their corresponding account ID's
	  Map<ID, Account> acctMap = new Map<ID, Account> ([Select ID, Last_SW_Activity__c from Account where ID in :acctIDs]);
//Create the account object
      Account acctRec = acctMap.get(t.accountID);

//If the account ID isn't null, the subject line starts with "sw", and the task has been marked as completed    
	If (t.accountID =!null && t.subject.indexOf('sw') && t.Status == 'Completed')
//Check to see if the Last_SW_Activity__c field is current compared with the latest completed activity
  	  If (acctMap.get.(t.accountID).Last_SW_Activity__c < t.endDateTime || acctMap.get(t.accountID).Last_SW_Activity ==null){
//Update the Last_SW_Activity__c field on the account object with the task's end date  
  		  acctrec.Last_SW_Activity__c = t.endDatetime;




 The error I'm getting states "Invalid field endDatetime for SObject Task".  It's refering to the last line of code.  Does anybody have any idea why it's giving me that error?

Best Answer chosen by Admin (Salesforce Developers) 
Jake GmerekJake Gmerek

 t.accountID =!null in your code should be




you had the ! and the = switched.