image post

Redirect all requests from HTTP to HTTPS in Node.js and Express

How to redirect all non secure requests to HTTPS in Node.js and Express
Jun 15, 2020
The first step will be to create a method to guess if the HTTP request comes from HTTP or HTTPS (secure or not secure). In some context like AWS or Heroku you will have to ask by the header x-forwarded-proto instead of req.secure.

image post

Migrate $User, $Profile, $Label and $Api to Lightning Components

Rollout to Lightning by migrating non-supported JavaScript buttons
Jun 18, 2020
We can’t use $User, $Profile, $Label and $Api in Lightning. We need to implement a server-side solution.

image post

How to convert sforce.apex.execute to Lightning

Use a Lightning Component to make your JavaScript buttons work when your move to Lightning Experience
Jun 18, 2020
Let’s see how to convert a Salesforce JavaScript button that uses sforce.apex.execute in to Lightning Experience. The good news is you will reuse this code and the approach for all your similar buttons.

image post

Migrate sforce.connection.query to Lightning equivalent

Use Lightning Components to move your JavaScript buttons implemented for Classic
Jun 18, 2020
As you probably know, JavaScript buttons are not supported in Lightning Experience (LEX). In particular, you can’t use REQUIRESCRIPT. In this post, the idea is to show how to migrate a particular JavaScript button that uses sforce.connection.query sentence.

image post

How to connect to a PostgreSQL database in Node.js

Connect to Postgres database in Node js using pg and parse-database-url packages
Jul 28, 2020
A simple example about how to connect to a PostgreSQL database using Node.js

image post

Configure Prettier in your Node JS project

How to configure Prettier to format your code as It was written by only one developer
Aug 08, 2020
Prettier is a code formatter that supports many languages and can be integrated with most of the editors

image post

Load stylesheets in background to increase page speed

Aug 16, 2020
Optimize the page loading time by loading your style sheets in background.

image post

pg-promise self signed certificate error in Postgres

To fix this issue you have to use the package with the following recommendations
Aug 20, 2020
If you are using Node.js with some of these packages: pg-promise or pg probably you are facing this issue.

image post

Get all tables in Redshift

Aug 23, 2020
Get all tables from a given schema

image post

Define environment variables in Tomcat

Aug 29, 2020
Sometimes you want to change the behavior of your code without recompiling or deploying.

image post

How to use a GitHub repository as a dependency in Node.js

Aug 30, 2020
Sometimes you need a dependency that is not published as a regular package at npmjs.com

image post

Detect record changes in a Lightning Component

Listen to events when a record changes outside your Lightning component
Apr 16, 2021
Listening to changes in a Lightning Component from record changes

image post

SFDX - Error authenticating with auth code due to: grant type not supported

Common error when authenticating from SFDX CLI
Apr 27, 2021
Error authenticating with auth code due to: grant typw not supported. This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again

image post

How to render HTML in Jade

Jade is a Node.js template engine that uses indentation as part of the syntax
May 15, 2021
By default, Jade buffers the output so we have to be explicit when we want unbuffered code

image post

Magic Mover for Notes And Attachments to Lightning Experience

Get ready for Lightning Experience by migrating your attachments and notes
May 22, 2021
Files are more versatile and provide better functionality than attachments. Attachments can only be attached to a single record, while files...

image post

error authenticating with auth code due to: grant type not supported

error authenticating with auth code due to: grant type not supported
Aug 31, 2021
error authenticating with auth code due to: grant type not supported

image post

How to connect to a MySQL database in Node.js

Oct 12, 2021
To connect to a MySQL database in Node.js is pretty straightforward with the module mysql2.

image post

Load dynamic data into a table using Lightning Web Component

Create a custom tab to display a Lightning Web Component
Nov 04, 2021

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
Nov 10, 2021
Based on this query we are going to build a method that gets the record type id by its name


image post

Getting some insights from Jacoco html report

A simple script to count packages that contain classes with low coverage
Nov 29, 2021
After running the Jacoco report generator we can open it and see the coverage results. There are some results the I wanted to know, for example, how many packages contain uncovered classes and how many contain coverage under a given threshold

image post

Lightning data table conditional cell color

Set text or background color for lightning data table rows
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

Salesforce inspector: a Salesforce data explorer and exporter

Chrome and Firefox extension to inspect and export data from Salesforce
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

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.
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

How to delay an execution in Salesforce Apex

Using Schedulable interface to delay an execution in Apex
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

Get Salesforce ContentVersion file info using node-fetch

How to get a Salesforce file info without downloading the file itself
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

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

Salesforce SOQL query to get accounts with at least one closed won opportunity
Jul 24, 2022