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

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
161 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": "...
4
votes
0answers
90 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....
4
votes
1answer
2k 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: ...
3
votes
1answer
780 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' }); ...
3
votes
0answers
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 ...
2
votes
3answers
545 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 ...
2
votes
0answers
570 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-...
2
votes
0answers
659 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, ...
2
votes
1answer
411 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=...
2
votes
0answers
203 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. ...
2
votes
0answers
85 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,...
1
vote
1answer
299 views

Create a bulk job using JSforce

I am trying to create a bulk api query job using jsforce and nodejs. Below is the method i am calling after getting the access token. But it is not creating the job. Is the below way correct to create ...
1
vote
1answer
271 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 ...
1
vote
0answers
107 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 ...
1
vote
2answers
471 views

I am doing API Automation Testing using JSForce to connect with Salesforce Connected App to create some data like "Opportunities" , "Accounts"

I am trying to connect to Salesforce using jsforce and create the Account using below code: const jsforce = require("jsforce"); conn = new jsforce.Connection({ // oauth2 : { ...
1
vote
0answers
27 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 ...
1
vote
0answers
280 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, ...
1
vote
0answers
343 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 ...
1
vote
0answers
313 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 ...
1
vote
0answers
895 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 ...
1
vote
0answers
196 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 ...
1
vote
1answer
313 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 ...
1
vote
0answers
198 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/
0
votes
0answers
80 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 ...
0
votes
0answers
204 views

API Error: Wrong number of dashboardFilterColumns 1 instead of 2

I'm trying to use the metadata API to move a dashboard from one Salesforce to another, and I'm getting the error Wrong number of dashboardFilterColumns 1 instead of 2 The dashboard does have 2 ...
0
votes
0answers
23 views

Account lookupfield in bulkUpsert

I'm sending over custom Objects to SF using jsforce bulkUpsert. const foos = [{name:'test', accountBillTo:'123'},{name:'test2', accountBillTo:'123'}]; const upsertRes = await conn.sobject(&...
0
votes
1answer
192 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....
0
votes
1answer
133 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 ...
0
votes
0answers
82 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 ...
0
votes
0answers
548 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/...
0
votes
0answers
330 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 ...
0
votes
0answers
369 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 (...
0
votes
1answer
118 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, ...
0
votes
0answers
366 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', ...
0
votes
0answers
190 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 ...
0
votes
0answers
1k 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://...
0
votes
1answer
558 views

Custom field not showing in list of described object

I am working on an integration using JSforce to query the Salesforce API for data. When I run a describe('object'), I get a list of fields that are contained within said object, including custom ...