salesforce


image post

Invoke Apex method from Salesforce Flow Builder

Sometimes the out of the box functionality is not enough to automate all our processes
Andrés Canavesi - Aug 04, 2022
Flow Builder is the replacement of Process Builder in Salesforce. Both of them are useful to automate several kinds of process but sometimes the out of the box functionality is not enough

image post

How to use Queueable interface in Apex

Stay away from the limits in Salesforce by implementing the Queueable interface in our Apex classes
Andrés Canavesi - Aug 03, 2022
By using queueable, you will stay away of limits, specially CPU limit.



image post

Get Accounts with at least one closed-won opportunity in Salesforce

Salesforce SOQL query to get accounts with at least one closed won opportunity
Andrés Canavesi - Jul 24, 2022

image post

Salesforce Apex method to get the country name by ISO Code

Convert ISO code into country name in Salesforce Apex
Andrés Canavesi - Jul 24, 2022
This method in Apex receives the country ISO code as string and returns the out of the box country name.

image post

Download a Salesforce ContentVersion file using node-fetch

Download locally a file stored in Salesforce using node-fetch package for Node.js
Andrés Canavesi - Jul 07, 2022
Let's download a file (ContentVersion) from Salesforce using node-fetch

image post

Get Salesforce ContentVersion file info using node-fetch

How to get a Salesforce file info without downloading the file itself
Andrés Canavesi - Jul 07, 2022
Let's say you want to get the file info without downloading it. For example, you want to know the file name and extension.

image post

Salesforce CLI - SFDX - Cannot read properties of undefined (reading 'id')

The error doesn't give us so much information but it is related to the URL we are using
Andrés Canavesi - Jul 06, 2022
Cannot read properties of undefined (reading 'id'). This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again.

image post

How to delay an execution in Salesforce Apex

Using Schedulable interface to delay an execution in Apex
Andrés Canavesi - Jun 10, 2022
In Java, we can use Thread.sleep(1000) to delay the execution by one second. In Apex is not that easy since Salesforce is a multi-tenant environment.

image post

MIXED_DML_OPERATION error and Apex unit tests (how to fix it)

This is a common error when we start to work with testing or manipulating some particular objects: setup and non-setup objects
Andrés Canavesi - Feb 09, 2022
One option is to use @future method but since that's for running in background, we cannot query that data in the next line due to it could be created or not.

image post

AWS suspended error AppFlow

The flow has been suspended due to an error in Salesforce when subscribing to the event.
Andrés Canavesi - Feb 09, 2022
AWS AppFlow suspended status error is sown for many reasons. You have to click on the <i>Suspended</i> word in the AWS console to see the extended error. Another option is to see it through the CLI

image post

AWS AppFlow error conflict executing request connector profile is associated with one or more flows

If we try to delete a connector from the AWS console and it is associated with one or many flows, it will display this error.
Andrés Canavesi - Feb 09, 2022
Let's say you have a Salesforce connector (it is valid for any other available) and the token expired. The only way so far is to delete and recreate the connection again. Would be nice to keep the same connection and run the handshake again but it is impossible nowadays.

image post

Salesforce inspector: a Salesforce data explorer and exporter

Chrome and Firefox extension to inspect and export data from Salesforce
Andrés Canavesi - Jan 18, 2022
A productivity tool for Salesforce administrators and developers to inspect data and metadata directly from the browser without compromising security and privacy

image post

Lightning data table conditional cell color

Set text or background color for lightning data table rows
Andrés Canavesi - Jan 13, 2022
Let say you want to highlight a cell in a Lightning data table (lightning:datatable) when a specific value is invalid. In our example, we want to display those invalid emails in red.


image post

Invalid request provided: AWS::AppFlow::FlowCreate - Salesforce integration

This is a common error when a field is mapped in App Flow but it doesn't exist in Salesforce
Andrés Canavesi - Nov 19, 2021
Resource handler returned message: "Invalid request provided: AWS::AppFlow::FlowCreate Flow

image post

Call an Apex method from Process Builder

See how to configure a Flow with process builder to execute an Apex method in Salesforce
Andrés Canavesi - Nov 11, 2021
As a thumb of rule in Salesforce you should always try to create new business logic through point-and-click but sometimes our logic it's a bit special and we need some Apex code.

image post

Get Record Type id by name in Apex - Salesforce

SOQL query to get a record type by name to use it in Apex code
Andrés Canavesi - Nov 10, 2021
Based on this query we are going to build a method that gets the record type id by its name