This article demonstrates automatically refreshing dashboards using apex scheduled job that you can plan to run at specific times.
It uses a custom setting to store the dashboard Ids then a scheduled job to get all dashboard Ids from the custom setting and refresh the dashboard at specific time or multiple times a day.
Author: Waqar Hussain
Founder and the owner of SF Crunch. A Salesforce enthusiast, a Salesforce Certified System Architect with over a decade of experience in the Salesforce domain.
I am working as a full-time Salesforce architect and developer. I spent my spare time writing articles related to Salesforce for you guys.
I have demonstrated experience in the full Salesforce development lifecycle, designing solutions, and implementation.
This article explains how to use Salesforce Screen Flow to open a record in a console sub-tab. By creating a text template that includes the record’s ID and using a display text component, users can click a link that opens the record within the console rather than a new browser tab. Two key steps are involved: (1) creating the text template with the record ID, and (2) displaying the template in the flow using the “Display Text” component.
This articles leverages a lightning web component to export the data from Salesforce screen flow. The LWC inputs a collection variable and convert it into a CSV file. Moreover, you also have options to select an sObject and fields to be exported into the CSV file.
This article walk you through using the Slack API within Salesforce Apex. This contains an example of unarchiving the Slack channel using API: https://api.slack.com/methods/conversations.unarchive
This article has two apex invocable actions that can be invoked from the flow and other apex classes.
This class can be used in flows to send emails programmatically without needing predefined email alerts.
It allows customization of email content, recipients, and attachments on the fly. The Apex class is designed to send emails from Salesforce without the need for an Email Alert.
This article shows, how to preview an email in a screen flow with actual merge fields populated before sending it out to a customer, ensuring all details are correct. By using an Apex invocable action that returns email body with all the merge fields populated and in the screen flow show text using display text component and HTML body using an LWC.
A Salesforce formula that returns a date. It evaluates the first day of the next month based on the current date.
In this article, I introduce some user management features in Salesforce such as user access policies, view summaries of users, and permission sets. These features are either recently introduced or going to be generally available in the summer 24 release. I provide a step-by-step demonstration of how to enable and use the user access policy feature, which allows you to manage the assignment of permission sets, public groups, and queues to users. I also showcase the view summary feature, which displays all the permissions assigned to a user or a permission set on a single page. No action is requested from the viewers, but this video aims to provide valuable information about these user management features.
This article provides a workaround for an issue encountered with the BR() function in Salesforce flow formulas. Instead of generating a line break, the BR() function outputs the br tag.
a formula field that calculates a date 30 days from today and ensures that the date does not fall on a weekend. If the calculated date lands on a Saturday or Sunday, the formula returns the following Monday.
This article provides step-by-step instructions to help you set up an automation using Change Data Capture, Flow and Apex trigger to update the lead Owner, when a lead is assigned to a Specific cadence. The apex trigger listens for new events on the ActionCadenceTrackerChangeEvent object, and when a Lead is targeted by a specific cadence (‘my test cadence’), it triggers a Flow to update the lead owner with the cadence assignee.
This article walk you through creating an Apex class which is used to send a summary of open tasks to each active standard user in Salesforce, helping them stay informed about their pending tasks. The email is sent from a specified org-wide email address, and the tasks are listed in a table format within the email.
An example of LWC to display CMS Content (Collection) as an accordion on a public Lightning Web Runtime (LWR) site, leveraging the ConnectAPI.ManagedContentDelivery class. In this example, I use the getCollectionItemsForChannel method from the ConnectAPI.ManagedContentDelivery class to retrieve CMS Collection items and display them as an accordion.
The following article demonstrates exposing the apex class as a REST web service for creating a lead record in Salesforce. It is designed to handle HTTP POST requests containing lead data in JSON format.
This Lightning Web Component (LWC) provides a seamless UTM builder functionality, enabling users to effortlessly generate UTM parameters for their marketing links. UTM, which stands for Urchin Tracking Module, is a set of query parameters added to URLs for tracking the effectiveness of online marketing campaigns.
This article illustrates creating a lightning web component to export opportunities to a CSV file with a simple button click directly from the account detail page. This solution eliminates the need for Apex code, opting instead for the utilization of the getRelatedListRecords wire adapter.
This article walks you through to process apex trigger records in less than 200 records per transaction using queueable chaining apex job to avoid Salesforce limitations.
Consider a situation where you are bulk inserting records into a custom object or standard object, and you have an Apex trigger that is fired by this custom object. This trigger contains complex business logic, and you’re running into Salesforce limitations due to processing the default batch size of 200 records in a single transaction.
This article walks you through creating a validation rule using a record trigger flow instead of using apex code for complex business requirements. Sometimes we have requirements that can not be accomplished using standard validation rules. So you can use this approach instead of developing before insert apex trigger.
This articles covers a business requirement that before an opportunity is marked as closed won, the opportunity must have at least one contact role.
An apex function to split the last name into first name and last name using Salesforce apex.
Recently I was working on Salesforce – Asana integration project using Asana API in apex. It works fine by creating asana tasks, sub-tasks, etc. using normal API requests. But when it comes to uploading files as attachments to Asana consuming API, I was stuck. Because it requires the file data to be encoded in some special format with the multipart/form-data.
When you update a multi-picklist field’s value using flow, the existing values are lost. This article walks you through updating the multi-select picklist field’s value using flow without losing existing values.
Bulk update the published articles.
1. Create a new draft version of the published article.
2. Update the draft version of the article with the changes that you need.
3. Update a new temporary checkbox field Article_To_Publish__c with TRUE.
4. Finally, publish the article again.
Logging errors are helpful, primarily when an error occurs in the future, background apex jobs, or flows. Especially when you want to investigate why some background jobs are not working as expected and you want to know how frequently the jobs are failing.
Using the following solutions you can find the apex error exceptions easily. You can see why the error occurred and on which line of code the error occurred. You can see the errors in a list view and can do reporting on a specific error.
A solution to upload files from the same screen from where you get the record information from the end user.
Integration between Salesforce and Stripe. Sample code to create an charge object in stripe using apex code. The apex code can be invoked from the flow.
Find the number of days between two dates excluding weekends and holidays using apex
Create weekly, bi-weekly, monthly, quarterly, yearly and bi-yearly recurring tasks using apex.
Round Robin Assignment for any user lookup field using custom object and apex code.
If an opportunity has a quote then it must be synced to the opportunity in order to make the opportunity stage to Closed Won.