dev




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

First-time shipped implementation is like going into technical debt

What is technical debt and why you should pay attention to it?
Andrés Canavesi - Feb 22, 2022
Technical debt is often asymptomatic, making it difficult to prioritize, but once the symptoms appear, it may be too late and the associated costs may be much higher.

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.