Skip to main content

Feed

Connect with fellow Trailblazers. Ask and answer questions to build your skills and network.

  

I hope this message finds you well. I am reaching out regarding an issue I encountered while working with Salesforce and Visual Studio Code.

I successfully authorized my Salesforce org and deployed components from Visual Studio Code using the Salesforce CLI. However, after the deployment, the components are not appearing in the authorized Salesforce org as expected. I have verified that the deployment was completed successfully in Visual Studio Code, but despite this, the components do not show up in the org.

Could you please assist me in resolving this issue? Any guidance or troubleshooting steps would be greatly appreciated, as I am unable to proceed with the project without these components appearing in the org.

Thank you for your time and support. 

 

Issue with Deployed Components Not Showing in Authorized Salesforce Org :

 

 

Deployed.png

 

 

 

#Trailhead Challenges  #Lightning Web Components

0/9000
2 answers
  1. Today, 9:48 AM

    i am not getting the option to select when i click on unified link 1 while choose the value for data space as default

0/9000

Would like to know what is the best to prevent users from approving their own records in once it has been sent for approval, we have a fairly complicated approval process?

2 answers
  1. Today, 9:46 AM

    Hi, 

     

    They do not have Modify All permission on the object.

0/9000

 I have several agents, and I want it to be possible to route between them based on the user's choice. 

 If the user is currently with Agent A and wants to speak with Agent B, he should have the option to do so. 

 I’d be happy to hear how this can be done. 

 Thanks in advance!  

 

#Agentforce

1 answer
  1. Today, 9:45 AM

    Hi @Michal Chinkis

      

    While Agentforce doesn’t have a built-in feature for routing between agents dynamically, it is possible to achieve this through custom solutions. Here's how it can be done:

    1. Custom Routing Logic: You can create a custom flow that allows users to choose which agent they want to speak with. Once the user selects the agent (e.g., from a dropdown or button), you can use backend logic to reassign the user to the new agent.
    2. Queues and Assignment Rules: You could set up different queues for each agent and route users to these queues based on their selection. This would require some Apex or API integration to manage the assignment process.
    3. Custom Chat Interface (LWC): A custom Lightning Web Component (LWC) could provide a seamless interface for the user to select the agent they want to chat with. Upon selecting, backend logic could reassign the chat session.

    Considerations:

    • Ensure the session is maintained and there’s no loss of context when switching agents.
    • Use notifications to alert the new agent when they are assigned to the chat.
0/9000

I have a partner community site. Where I have a Crew Management tab , but here I am not able to view the Gantt chart for the crew part. But I am able to view the territories, calendar view but not the gantt for crew. 

 

Have attached the screenshot below. 

 

Do I have to enable any permissions for this issue? 

 

Thanks in advance 

Crew Management Gantt chart

 

 

 

#Service Crew Management  #FSL  #Salesforce Developer  #Salesforce Admin  #Sales Cloud

0/9000

Hi there, 

 

I'm running into a problem that I haven't found a solution for in our Salesforce org. 

We've never had problems with this until recently (+/- 2 weeks)  

 

When a user assigns an event to another user, it gets deleted sometimes. Not everytime, but just seemingly random. 

Of course I can put it back from the recycle bin, but that shouldn't be happening nor was it happening before.  

 

We have the connection with our Outlook, but we've always had that and there have been no changes with that recently as far as I know. 

 

Does anyone have an idea what I can do to fix this issue? 

I appreciate your time. 

 

 

#Event Object  #Delete Activity Event  #Delete Records

2 answers
  1. Today, 9:42 AM

    Thank you for your quick answer! 

     

    In your link I see the issue is known since 2023, but no solution as of yet unfortunately. 

    Other then the one I was already using. 

    I'll keep an eye on that page and hope it get resolved soon. 

     

0/9000

We want to control what our reps see on their calendar, based either on time or prior calendar event action taking place. Does anyone know if this is something that is at all possible? Hiding event details until X time passes OR X critera are met. 

1 answer
  1. Divya Chauhan (Kcloud Technologies) Forum Ambassador
    Today, 9:42 AM

     1.Yes it's definitely possible to hide calendar event details in Salesforce based on time or specific conditions, but it does require some custom setup.  

     2.You can use things like

    Apex triggers or Flows combined with Restriction Rules (which have been available for Events since the Winter '22 release) to control who sees what. If you're looking to hide details temporarily—like until a certain time passes or a task is marked complete—you could set up a Scheduled Flow or Batch Apex

    to change the event’s sharing settings (for example, set it to "Hide Details").  

    3.Salesforce doesn’t offer this out-of-the-box for dynamic scenarios, but you can work around it. One option is to set your

    Organization-Wide Defaults for Events to "Hide Details"

    and then use code to update visibility based on your logic or timing.  

    for more details you can refer below blog-

0/9000

I have this class:  public class CandidateFetcherQueueable implements Queueable {      private List<Id> serviceAppointmentIds;      private Boolean withDelay; // Flag to introduce delay        public CandidateFetcherQueueable(List<Id> serviceAppointmentIds, Boolean withDelay) {          this.serviceAppointmentIds = serviceAppointmentIds;          this.withDelay = withDelay; // Initialize delay flag      }        public void execute(QueueableContext context) {          System.debug('CandidateFetcherQueueable executed for SAs: ' + serviceAppointmentIds);            if (withDelay) {              Long startTime = System.now().getTime();              while (System.now().getTime() - startTime < 5000) {                               }          }          List<ServiceAppointment> serviceApps = [              SELECT Id, ServiceTerritoryId, Work_Order__c, Sub_Customer__r.Send_Potential_Tech__c,                     Active_Technician__c, Active_Technician_Details__c              FROM ServiceAppointment               WHERE Id IN :serviceAppointmentIds                 AND Do_Not_Use_SA__c = true          ];          for (ServiceAppointment sa : serviceApps) {              if (sa.ServiceTerritoryId == null) {                  System.debug('ServiceTerritoryId not populated for SA: ' + sa.Id);                  continue;              }              FSL__Scheduling_Policy__c schedulingPolicy = [                  SELECT Id, Name                   FROM FSL__Scheduling_Policy__c                   WHERE Name = 'Resource Capability'                   LIMIT 1              ];                if (schedulingPolicy == null) {                  System.debug('Scheduling policy "Resource Capability" not found.');                  continue;              }              FSL.GradeSlotsService slotService = new FSL.GradeSlotsService(schedulingPolicy.Id, sa.Id);              FSL.AdvancedGapMatrix resultMatrix = slotService.getGradedMatrix(true);              Map<Id, FSL.ResourceScheduleData> resourceData = resultMatrix.ResourceIDToScheduleData;              System.debug('Resource Data: ' + resourceData);              Set<Id> resourceIdsToQuery = new Set<Id>();              for (Id resourceId : resourceData.keySet()) {                  if (!resourceData.get(resourceId).SchedulingOptions.isEmpty()) {                      resourceIdsToQuery.add(resourceId);                  }              }              System.debug('Resource IDs to Query: ' + resourceIdsToQuery);              Map<Id, ServiceResource> serviceResources = new Map<Id, ServiceResource>([                  SELECT Id, Name, MobilePhone__c, Email__c                   FROM ServiceResource                   WHERE Id IN :resourceIdsToQuery              ]);              List<String> resourceIds = new List<String>();              List<String> technicianDetails = new List<String>();              for (Id resourceId : resourceData.keySet()) {                  if (serviceResources.containsKey(resourceId)) {                      ServiceResource sr = serviceResources.get(resourceId);                      resourceIds.add(resourceId);                      technicianDetails.add(sr.Name + ' , ' + sr.MobilePhone__c + ' , ' + sr.Email__c);                  }              }              System.debug('Resource IDs: ' + resourceIds);              System.debug('Technician Details: ' + technicianDetails);              if (!resourceIds.isEmpty()) {                  sa.Active_Technician__c = String.join(resourceIds, '; ');                  sa.Active_Technician_Details__c = String.join(technicianDetails, '; ');                  update sa; // Ensure the SA is updated                  System.debug('Updated SA with candidate data: ' + sa.Id);              } else {                  System.debug('No candidates found for SA: ' + sa.Id);              }          }            if (!Test.isRunningTest() ) {                System.enqueueJob(new ResourcePreferenceCreatorQueueable(serviceAppointmentIds));  }          }  }        

 

@* Salesforce Developers *  @* Salesforce Field Service * 

8 answers
  1. Today, 9:39 AM

    As an aside, you queueable class has some serious issues with it.

     

    You are running through a loop of service appointments and within that loop perform 2 SOQL queries (one of which is constant) and 1 DML op. The DML op may cause all sorts of other stuff to happen as well.

     

    This is an anti-pattern on more or less any platform, but on Salesforce this will cripple your processes with performance and governor limits. In this case you will maybe even use up your daily async limit as you may be forced to run far more queuables than needed due to it being so poorly coded. Due to the poor performance it may also cause the rest of the system to slow down, as other queueables are waiting for these slow running ones to complete (or because they flooded the queue as you have to fire off more then needed to keep within governor limits).

     

    Pull out the SOQL so it happens outside the loop, and build up a list of records to update after the loop has finished so there is only 1 DML op. 

0/9000

HI, 

 

I have a couple flows that at the send out an email via the Send Email action at the end to a Account record Collection, the action is in a Loop. I want to check if this approach will hit an SOQL 101 error if the amount of emails the flow has to send is more than 100 in the loop? Or woud it be better if I can use "send email" action once outside of the loop and have it email a collection, if so How do I setup the Send Email action for that. I have to be able to relate all email the the Account or contact record. In my record Collection I ahve both the email and Account ID for example.  

 

If the Send Email Action doesn't have limits within a loop like a Create Record etc then I should be fine to leave it? 

 

In the Send Email Action, I have a text template for the body, Log Email on Send = True, Recipient Address List = Current Item in Loop > Business Email, Related Record ID > Current Itemt in Loop > AccountID, and all other essential field are filled. 

 

Thanks 

@Admin Trailblazers@Salesforce Flow Automation

 

 

#Flow  #Data Management  #Email  #Email Deliverability Issues  #Email Alerts

1 answer
  1. Divya Chauhan (Kcloud Technologies) Forum Ambassador
    Today, 9:37 AM

     If you're using the "Send Email"

    action inside a Flow loop that goes through a collection of Account records, here’s what you should know:  

    Will It Cause a SOQL 101 Error?

    • Not directly. The "Send Email" action doesn’t count toward the 101 SOQL query limit since it’s not actually running a SOQL query.
    • However, if you have other elements inside the loop—like "Get Records"—those could contribute to hitting the limit if not handled properly.
    • Also, remember that a Flow loop has a 2,000 iteration limit per transaction, so if you're working with a big record set, that’s something to watch out for.

    Email Limits-

    • Salesforce allows up to 5,000 emails per transaction when using Flow.
    • So if you're sending one email per record and staying under 2,000 records, you’re fine.
    • Sending emails in a loop is okay for smaller data sets (e.g., under 100–200 records).

    Is It Better to Move "Send Email" Outside the Loop?

    • Yes, definitely, especially if your record count might grow over time.
    • Instead of sending one email per iteration, you can build a list of email addresses during the loop.
    • Then send a single email outside the loop using that list. It’s cleaner, faster, and more efficient.
0/9000

Any way to pull the call transcript from conversation insights? I know the AI processes this data and wondering if there is a way to view it.  #Einstein Conversation Insights

2 answers
0/9000