Hello, Javaniceday!

Reading Time: < 1 minute
  • Download Salesforce metadata using SFDX

    Reading Time: < 1 minute cd some/directory sfdx auth:web:login -a my@username.dev –instanceurl=https://my-sfdc-instance.my.salesforce.com sfdx force:project:create -n myProject –manifest cd myProject sfdx config:set defaultusername=my@username.dev # Modify the package xml to retieve whatever we want sfdx force:source:retrieve -x manifest/package.xml # or retrieve this way sfdx force:source:retrieve -m "ApexClass:MyApexClass" Photo by Cookie the Pom on Unsplash Read more

  • Detect record changes in a Lightning Component

    Reading Time: 3 minutes 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… Read more

  • How to download a Salesforce file from Node.js

    Reading Time: < 1 minute 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);… Read more

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

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

    Reading Time: < 1 minute 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

    Reading Time: 2 minutes 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… Read more

  • Detect if a string is a number with regex

    Detect if a string is a number with regex

    Reading Time: < 1 minute 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