Skip to content

This project demonstrates Salesforce data interaction using Node.js and jsforce. This is a POC designed to understand how A React App using Node can fetch data from a Salesforce org levaraging jsforce lib that communicates through APIs to Salesforce

Notifications You must be signed in to change notification settings

tomsouza4/query-data-from-salesforce-using-jsforce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started with Create React App

This project was bootstrapped with Create React App.

Introduction

This project demonstrates Salesforce data interaction using Node.js and jsforce. This is a POC designed to understand how A React App using Node can fetch data from a Salesforce org levaraging jsforce lib that communicates through APIs to Salesforce

Requirements

Ensure you have the following libraries installed:

  • jsforce
  • dotenv

Run the following command to install the required dependencies:

npm install jsforce dotenv

Clone and Setup

Clone the repository:

git clone https://github.com/tomsouza4/query-data-from-salesforce-using-jsforce.git

Navigate to the project directory:

cd query-data-from-salesforce-using-jsforce

Install dependencies:

npm install

Run the React app:

npm start

Execute the script:

node src/CreateFields.js

Output Sample

Access Token Example: 00D8b0000022ug0!AQ8AQDTB8oa2CJdKDtx7t68ZbGid27hrU9BhTyG7WLbZBila46v5F7Gzap9pWCxVF8VDfUk.jD7h7t9q6mbYP._bjjDSQc22

Instance URL: https://wise-goat-rgjb32-dev-ed.trailblaze.my.salesforce.com

User ID: 0058b00000HEcA4AAL Org ID: 00D8b0000022ug0EAA

Total records: 22 Fetched records: 22

Fetched 22 records:

  • My Account #1 (0018b00002XvzaDAAR)
  • My Account #2 (0018b00002XvzaEAAR)
  • My Account #1 (0018b00002XvzaIAAR)
  • My Account #2 (0018b00002XvzaJAAR) ...
  • Postman (0018b00002NN8lBAAT)
  • Captain Bly’s Finest Treasure Chests (0018b00002NNJ56AAH)

Important Notes

If your Salesforce password and token include a single quote, make sure to escape it with a backslash () to prevent issues with code interpretation.

Additional Note

Be cautious with special characters like single quotes in your Salesforce password or token, as they might affect code interpretation.

Connected App to be created in Salesforce

  • Create the connected app
image
  • Set the Permitted Users & IP Relaxation
image

About

This project demonstrates Salesforce data interaction using Node.js and jsforce. This is a POC designed to understand how A React App using Node can fetch data from a Salesforce org levaraging jsforce lib that communicates through APIs to Salesforce

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published