Skip to main content

Questions tagged [jsforce]

JSforce (f.k.a. Node-Salesforce) is an isomorphic JavaScript Library utilizing Salesforce's API: It works both in the browser and with Node.js

41 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
265 views

Push topic message event type is always "updated" even when inserting object

I'm subscribed to two different push topics, and one of them doesn't register any event types as "Create" only as an "Update". My config for the working push topic is as follows: { "Name": "...
Micaiah Reid's user avatar
5 votes
1 answer
3k views

Salesforce API throwing error some times while creating accounts:-> Error: Invalid URI "/services/data/v36.0/sobjects/Account"

We get this error from salesforce (in the sandbox environment) erratically while creating new accounts. Sometimes the account gets created successfully and at other times we get this error: [Error: ...
Prem Govind's user avatar
4 votes
0 answers
139 views

JSForce describeGlobal isn't working when the community has an added URL

I have to be able to get all objects on my salesforce community and whenever i utilize the jsforce library to get the connection by using this method "jsforce.Connection" let conn = new jsforce....
JPG's user avatar
  • 243
3 votes
0 answers
786 views

REST API - Issue connecting JS app when CORS and Remote Site are both setup properly

I cannot connect to Salesforce to automatically create accounts from my javascript app. I continue to get the error: "Failed to load https://login.salesforce.com/services/oauth2/token: No 'Access-...
smcconnell's user avatar
3 votes
1 answer
1k views

Use JSForce to connect with a community/portal user

it possible to connect to sales force with a community license user using jsforce? This is what I have tried let conn = new jsforce.Connection({ loginUrl : 'https://login.salesforce.com' }); ...
rob's user avatar
  • 131
3 votes
0 answers
2k views

Problems authenticating using JSForce

so I've been trying to use JSForce to authenticate into SF. I used both the first example with SOAP API login and the second one with OAuth2: https://jsforce.github.io/document/#connection However, I ...
AKor's user avatar
  • 473
2 votes
3 answers
712 views

SFDX CI: Invalid record ID. Specify valid record ID value

I'm trying to follow Continuous Integration Using Salesforce DX trailhead module, however, I'm using my own repo (I didn't clone the sample repo that is provided). I've used their .travis.yml file ...
smukov's user avatar
  • 5,613
2 votes
0 answers
985 views

No 'Access-Control-Allow-Origin' header error using jsforce in React app (200 OK, CORS Added)

I'm having this issue when attempting to access the Salesforce API from my React app (inside a vf page). Seems odd that it would recognize this as a cross-origin request, but I whitelisted the origin, ...
NoxelNyx's user avatar
  • 130
2 votes
1 answer
498 views

Unable to update GlobalValueSet in managed org using jsforce metadata api

I have a managed org where I want to update my 'GlobalValueSet' using jsforce metadata api, but when I try to update I got following error : Cannot modify managed object: entity=...
Paras BK's user avatar
2 votes
0 answers
225 views

How to remove "No Access-Control-Allow-Origin" error while using steel brick quote calculator plugin

I am getting this error while calling rest api from jsforce on quote calculator plugin . XMLHttpRequest cannot load https://pdc--setup.cs52.my.salesforce.com/services/apexrest/SBQQ/ShippingCal. ...
Vivek Sharma's user avatar
2 votes
0 answers
122 views

Any clue as to why I am not able to use heroku environment variables in my jsforce auth function?

So I'm part of a team working on developing an a web app for our client, who uses salesforce as their database. We are using node.js on heroku to act for the server side code. The front end is angular,...
S.Perry's user avatar
  • 21
1 vote
0 answers
93 views

Salesforce SOAP API Query Operation - Invalid Session ID Error

I am attempting to perform a SOAP query operation against the Salesforce SOAP API to retrieve data from the ConnectedApplication object. However, each time I try to execute the query, I receive an &...
mysh's user avatar
  • 11
1 vote
0 answers
111 views

Handling Complete Error Messages in JSForce Promises for Salesforce Apex REST Calls

In a Salesforce instance we have a web service to be consumed by an external service. Considering the resource that the ws will consume, it has been designed in such a way that for each request ...
Tzinm's user avatar
  • 31
1 vote
0 answers
387 views

OmniOut + localhost:4002 error

Premise: I want to host my Omniscripts in a third-party CMS system but before that I have to demo that I can display my Omniscripts even on localhost. I followed this and this. My node version is 14....
user43598's user avatar
  • 517
1 vote
1 answer
790 views

Failed to update Salesforce account because of DUPLICATES_DETECTED error even with Allow setting in Duplicate Rule

I'm using JSforce to integrate Salesforce into my app. When I update a Salesforce account from my end via JSforce update function, it got DUPLICATES_DETECTED error because Salesforce considers this ...
Tan Vo's user avatar
  • 11
1 vote
0 answers
222 views

transform records from jsforce bulk api query

I am trying to modify the results of a query that uses the bulk api by using the recordStream.on('record',...) function. I've stepped through the code but it making modifications here (or in other ...
ben's user avatar
  • 11
1 vote
0 answers
39 views

Is there a way of retrieving records with ListViews AND with a certain communityId?

I'm currently getting records from listviews through the JsForce "listview" method and whenever i want to get records from a certain community i get them with the "find" method which i can pass the ...
JPG's user avatar
  • 243
1 vote
0 answers
476 views

Platform Event Limits regarding CometD and non-CometD clients

As per the Salesforce Documentation regarding Platform Event limits, in Performance or Unlimited Editions of Salesforce, maximum number of delivered event notifications within a 24-hour period, ...
nica's user avatar
  • 1,430
1 vote
0 answers
495 views

jsforce working on command line but not 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 ...
Vladimir_314159's user avatar
1 vote
0 answers
549 views

Establish JSForce Connection through Google Authentication

I am developing an application with the Ionic Framework, and my requirement is to login to Salesforce, make a connection to JSForce to be able to use their REST API. I will try and explain this ...
Malek MARRAKCHI's user avatar
1 vote
0 answers
2k views

JSForce Username and password authentication strategy

I'm using the username, password + authcode strategy in a node app to connect to salesforce. I've got a module to connect, and another to login to salesforce. Connect opens the connection and makes ...
McB's user avatar
  • 131
1 vote
0 answers
261 views

jsforce Apex REST call fails in IE11 only. ES6 Promise support issue?

I am calling a custom Apex REST endpoint from JS in a custom VF component within a VF page using the jsforce library, and everything works as expected in Edge, Chrome, Firefox, but not IE11. It seems ...
Brent Bowers's user avatar
  • 3,162
1 vote
1 answer
389 views

DX Scratch Org: Session expired or invalid on using JWT and jsforce

I have been testing FX and scratch orgs with jsforce and I based my first tests with this example. https://jsforce.github.io/blog/posts/20170629-salesforce-dx-with-jsforce.html With the recommendation ...
CedQc's user avatar
  • 11
1 vote
0 answers
2k views

jsforce query similar to mongo's $in?

I can do simple find and findOnes where I have, for example, one ID: const conn = new jsforce.Connection({ // you can change loginUrl to connect to sandbox or prerelease env. loginUrl : 'https://...
arcom's user avatar
  • 63
1 vote
0 answers
220 views

How to use Jsforce library in Angular2 and Ionic2 App?

I want to study Ionic2 app and try to use jsforce to access Salesforce API in my app, but I don't know how to import jsforce to my ionic2 app? https://jsforce.github.io/
BruceYue's user avatar
  • 433
0 votes
0 answers
40 views

How to create APEX triggers in salesforce using jsforce library

I am trying to create an Apex trigger on the Account object using jsforce. I've successfully established an OAuth connection, and I can query and create records without any issues. I've also tested ...
Avishka Dambawinna's user avatar
0 votes
0 answers
69 views

OAuth2 connection inconsistency using JSforce

My Nodejs app has the option for users to sign-in using their devOrg. And my app is establishing an OAuth2 connection using authorization code grant. The whole sign in works perfectly fine. After the ...
Aslah P Hussain's user avatar
0 votes
0 answers
242 views

How to update Custom Metadata Type records with JSforce

I am working on a node.js script where now I aim to update a Custom Field of a Custom Metadata Type record. So far, I have tried few different things, all of them without success: await connection....
Gabriel Serrano Salas's user avatar
0 votes
0 answers
139 views

JSForce connection with connected app returns undefined

I am using the below code to establish a connection with Salesforce connected app - const express = require('express'); //Adding Express const http = require('http'); //Adding http const jsforce = ...
sumchans's user avatar
  • 821
0 votes
1 answer
95 views

How to retrieve Salesforce Org Feature settings such as Activity Settings

Is there an easy way through APEX (like Schema.describe) to access feature settings in an org? Specifically we are interested in checking if Feature Settings -> Activity Settings -> Enable ...
Nelson Ramalho's user avatar
0 votes
0 answers
160 views

Not able to call Rest API from node-salesforce library

I am trying to hit salesforce restAPI using node-salesforce(primarily - jsforce) and here is the code var jsforce = require('node-salesforce'); restService.post("/searchAppointment", ...
SFDC buddy's user avatar
0 votes
0 answers
467 views

jsforce logout functionality

In one of my node project, I am using jsforce oauth2 to connect to Salesforce. This is working nicely. Below is the code I am using for logout functionality. This is also working fine without any ...
Somnath Paul's user avatar
0 votes
1 answer
947 views

Cannot update the value of a custom field on Case Object using jsforce

My Scenario I have a specific RecordType of a Case Called Customer Feedback. I can create a case with this specific record type like this: // Creates a new Case successfully, no custom fields. conn....
Gene's user avatar
  • 1
0 votes
1 answer
632 views

Access denied when using JSFORCE to connect and update records

we've developed an ecommerce website for a client and want to integrate with their salesforce to add opportunities when a potential client creates an order on the website. We had everything working in ...
Jacques Rouleau's user avatar
0 votes
0 answers
191 views

Column 'type' not found

Good afternoon. The following code returns a weird error. I've looked at https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_attachment.html as a guide and from what I ...
PaulyP's user avatar
  • 317
0 votes
0 answers
2k views

JSForce GET Request Issue

I am using a LWC Open source app to make a GET request to my Salesforce Org. I want to get the resource at : https://na111.salesforce.com/services/data/v42.0/sobjects/EventLogFile/0AT3h00000PE85uGAD/...
Apex Srinivas's user avatar
0 votes
0 answers
707 views

JSForce Query Call returning Errror: "INVALID_SESSION_ID"

I am building an SFDC backend express application using JSForce. When making SOQL queries I am getting a INVALID_SESSION_ID error. I can authenticate using oauth2 without any issues. I have access ...
Davis Handler's user avatar
0 votes
0 answers
626 views

Upload PDF to SalesForce Work Order using JSForce

I am trying to use JSForce to upload a PDF file to a WorkOrder in SalesForce. Here is the code I am trying to use, just don't know how to attach it to a work order ID fs.readFile(pdfPath, function (...
Ezekiel Hammond's user avatar
0 votes
1 answer
193 views

React.js GraphQL web app returning random null values

I'm working on a React.js web app that leverages GraphQL for accessing a combination of varying endpoints, including our org's SF data. My only issue is isolated to my Salesforce progress. In general, ...
SeanDev's user avatar
0 votes
0 answers
405 views

Ionic 2 salesforce connecting but streaming api subscription not working

here is the full code: import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import * as jsforce from "jsforce"; @Component({ selector: 'page-home', ...
NavinRaj Pandey's user avatar
0 votes
0 answers
227 views

Updating System Admin profile creates new System Admin profile?

I am using JSforce to update the System Admin profile to view a field that I am creating right beforehand. After creating the field I am using JSforce's update metadata method to update a custom ...
Embattled Swag's user avatar