Salesforce API Library for JavaScript applications (both on web browser and Node.js)
Questions tagged [jsforce]
59 questions
7
votes
1 answer
Trouble getting Salesforce login working with dj-rest-auth + django-allauth
My app has a Django 3.1 backend with django-allauth and dj-rest-auth (actively supported fork of django-rest-auth).
My mobile and web frontends can already sign in using Facebook and Google via REST. I'm now trying to add Salesforce as a 3rd REST…

sunw
- 535
- 5
- 29
3
votes
0 answers
JSForce Prototypes not working
Keep getting the following error when I run the three code blocks. The errors seem to show for some reason that prototypes aren't be loaded in some cases. I'm running this NodeJS (As a VSCode Extension). Any thoughts?
error TypeError:…

DimlyAware
- 433
- 2
- 4
- 17
2
votes
0 answers
Importing jsforce in typescript react application results in error
I'm using react function based components with typescript - webpack version 5.74
importing jsforce is resulting in the following error:
Uncaught TypeError: Super expression must either be null or a function
at _inherits (index.js:43:107)
at…

tsdev
- 21
- 3
2
votes
0 answers
Using jsforce, after negotiating the OAUTH2 flow, obtaining refresh & access token, but can't use them
After placing the refresh token, access token and the instance URL in the session, I have the following code:
app.get('/api/v1/refresh', function (req, res) {
const conn = new jsforce.Connection({
oauth2: {
clientId:…

Edmond Meinfelder
- 313
- 1
- 5
- 19
2
votes
0 answers
JSForce: Singleton or Connection or Pool
I'm using JSForce on my server that is accepting requests. As of now, a new connection is created on each JSForce request and then logged out once everything's all done. Am I going to encounter an issue with this methodology? Instead, does it make…

Jack
- 955
- 1
- 9
- 30
2
votes
1 answer
Webpack 5 Node Polyfill instructions don't work
I am trying to install jsforce with:
webpack 5.17.0
webpack-cli 4.4.0
No matter what I do I get these errors:
ERROR in ./node_modules/jsforce/lib/oauth2.js 8:18-40
Module not found: Error: Can't resolve 'querystring' in…

Steve Weiss
- 61
- 1
- 4
2
votes
0 answers
NodeJs : retrieving image from sfdc rest api and writing file on local system
I am trying to fetch images using SFDC rest API where I can see different types of responses for corresponding javascript file and image. Image retrieved shows a message of "Not supported format" but my javascript file works fine.
These are some…

Sakshi Sehdev
- 41
- 4
2
votes
0 answers
mocking jsforce SObject through jest
Currently I am mocking the jsforce connection call via jest.spyOn
I m able to mock for login method of jsforce.Connection but not able to mock sobject of jsforce.Connection. If I mock that too it show me some of lines are uncovered in that method…

RJ grover
- 91
- 1
- 5
2
votes
0 answers
Unable to make SalesForce REST API call using nforce
I am new to SalesForce and Heroku platform. I am trying to explore and learn as much as possible.
I have developed React app and deployed to Heroku. Its working as expected, but I am at a stage where I am suppose to make Rest API call to Salesforce…

salah9
- 502
- 1
- 10
- 21
2
votes
1 answer
Error subscribing to SalesForce topic from Node.js
I am trying to subscribe to a SalesForce topic from a Node.js server using the code provided in the documentation of JSForce:
conn.streaming.topic("InvoiceStatementUpdates").subscribe(function(message) {
console.log('Event Type : ' +…

Bustikiller
- 2,423
- 2
- 16
- 34
2
votes
2 answers
Cannot Update Custom Date field via SalesForce API (JSforce)
I'm using the JSforce library from a Node.js app to update a custom date field on an Opportunity object, but the field is not being updated. The response indicates that the update is successful and the SystemModstamp field is updated on the object,…

Brady
- 212
- 1
- 8
2
votes
0 answers
Query working in jsforce command line but not on the api
I am querying data from the data base from salesforce and it is working find with jsforce -l http://test.salesforce.com I then do a .register and a .authorize and then I can pull data from my salesforce database with a query language, and It works…

Vladimir_314159
- 1,457
- 1
- 9
- 21
1
vote
1 answer
Is it possible to use jsforce to achieve Schema.DescribeFieldResult?
wondered if anyone has used jsForce to retrieve metadata about custom fields - per what is possible via the DescribeFieldResult call described here -…

user1517566
- 348
- 1
- 3
- 14
1
vote
1 answer
Logging in to Salesforce with JSForce
I am using the JSForce docs in order to create a Javascript app to connect to my Salesforce org. My code is as follows:
var jsforce = require('jsforce');
var conn = new jsforce.Connection({
loginUrl : 'https://test.salesforce.com'
});
var…

NickJ
- 9,380
- 9
- 51
- 74
1
vote
2 answers
How to use html tag in salesforce task api?
I am using JSForce for make api calls on salesforce. I am trying to add task using this api
const body = `Click Here>`
const createObj = {
WhoId: contact.Id,
Subject: 'Call',
…

Profer
- 553
- 8
- 40
- 81