Hello, Javaniceday!

  • Detect record changes in a Lightning Component

    Let say you have a Lightning Component placed on the Account record page and you want to listen to changes that occur outside our component. For example, in your component, you display some Account data and that must be refreshed once the user clicks on the standard save button. We are going to write an Read more

  • How to download a Salesforce file from Node.js

    index.js const jsforce = require(‘jsforce’); const https = require(‘https’); const fs = require(‘fs’); const conn = new jsforce.Connection(); const userName = ‘*******’; const password = ‘*******’; const securityToken = ‘*********’; const fileId = ‘0684W00000BzWohQAF’; const fullFileName = ‘/Users/andrescanavesi/sf.png’; conn.login(userName, password+securityToken, function(err, res) { if (err) { return console.error(err); } console.log(conn.accessToken); console.log(conn.instanceUrl); // logged in user Read more

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

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

    We can’t use $User, $Profile, $Label, and $Api in Lightning. We need to implement a server-side solution. Read more

  • How to configure HTTPS in Node.js

    Sometimes we need to configure a secure environment locally to test how our application reacts to HTTPS. To configure HTTPS in Node.js is pretty easy, only a couple of steps and you will be able to use https://localhost:3000 I will assume you are using Linux or Mac The first step is to create a folder Read more

  • Detect if a string is a number with regex

    Detect if a string is a number with regex

    Regular expressions, commonly shortened to regex, are a powerful tool for working with text data in programming. One common task is determining whether a given string is a number. Fortunately, this is a task that can be accomplished with a relatively simple regex pattern. Read more

  • Define environment variables in Tomcat

    Sometimes you want to change the behavior of your code without recompiling or deploying. One way to do this is by defining environment variables that you can change at any time. A typical use case is for database connection properties (username, password, port, etc). In your Tomcat home create this file $TOMCAT_HOME/bin/setenv.sh and define variables Read more