We’re rewarding the question askers & reputations are being recalculated! Read more.

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

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

Can't use lookup pass through in SOQL with jsforce

When I run the query: SELECT Id, Name FROM Account WHERE Owner.Name = 'QA User' LIMIT 1 in the Salesforce inspector or dev console I get the record and I can confirm that it exists. But when I ...
0
votes
1answer
51 views

How to set maxRequest in sfdx plugin? Error: exceeded max limit of concurrent call

We're developing an SFDX plugin aiming to help us with data migration between orgs. SFDX plugins are using jsforce, as far as I've seen it's wrapped into @salesforce/core package. When writing using ...
0
votes
2answers
310 views

How to get all records from Report using JSforce NodeJS

I am trying to get all records from a specific Report. I am using NodeJS and the library JSforce. I have tried using the following code: var report = conn.analytics.report(reportId); report.execute({...
0
votes
1answer
86 views

Jsforce where clause having multiple conditions not working

This below code results in INVALID_FIELD: Test' AND ParentId = null AND EndDate > '2019-05-21' LIMIT 1 error.. How can I add more than one condition in where clasue? const a = 2019-01-03 const b = ...
1
vote
1answer
183 views

Query Data with JSforce Using Connected App [closed]

I want to use package JSforce to Query SF data using external app. Can do it quite easily by using userName/password/token conn.login('someusername', 'somepassword+token', function(err, userInfo) { /...
0
votes
0answers
99 views

JSforce bulk api version 2

I'm trying to use the bulk api from jsforce in nodejs using the methods mentioned here. When running this, I'm noticing that its creating a job with BulkV1. Is there a jsforce library that supports ...
1
vote
2answers
449 views

How to use “jsforce” in an external HTML client for streaming api?

I am trying to use streaming API feature of salesforce, and be able to subscribe to the topic in an external client which is HTML based. My code is below: <html> <head> <...
0
votes
0answers
65 views

Jsforce Upsert QuoteLine object

I try with a custom script to upsert a QuoteLineItem but I face a problem with the SBQQ__Quote__c field, which is a Master-Detail of the Quote object. This is my code : export function ...
0
votes
1answer
63 views

Can JSForce be used in a public site without login?

I want to build a public Salesforce site where I can share my SF Accounts' details with the public without forcing them to login (I know this can be achieved with a controller/ JavaScript Remoting). ...
0
votes
1answer
143 views

JSforce - how to get the running user?

I'm following the Getting Started section on the JSforce documentation and I'm getting the following error: resource: the server responded with a status of 400 (Bad Request) INVALID_SESSION_ID ...
2
votes
1answer
184 views

I am querying more than 2000 records. Is it a good idea to use the BULK API?

I'm new to the Salesforce community, so I apologize if this question is asked wrong. I was running into essentially the exact same problem mentioned in this post. Basically, I have a query that ...
0
votes
1answer
53 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
1answer
43 views

jsforce library inserting array of elements

I am using the jsforce library and I have a question about if I insert an array of elements in an entity, it returns an array of elements sorted as they were inserted. I have found that in APEX it ...
2
votes
3answers
440 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 ...
0
votes
1answer
233 views

I want to use JSForce to create a custom field on the Contact Object using the metadata API

I am trying to use code like this to create custom fields on the Contact Object in salesforce using JSForce. This does not work of course and the documentation does not show how to do this with ...
2
votes
0answers
283 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-...
5
votes
1answer
526 views

How to use JsForce in a Salesforce Lightning Component

BACKGROUND I would like to be able to interact with the various Salesforce REST API from client-side JavaScript code, without needing to go via a Apex controller method and then making a separate ...
1
vote
1answer
206 views

SOQL Order By field in child relationship

I'm trying to use SOQL (with JSForce in a nodejs app) to execute a query like what is below. SELECT Name, Oppnum__c, Id, ( SELECT CreatedDate FROM Times__r ORDER BY CreatedDate DESC LIMIT 1) FROM ...
1
vote
0answers
216 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
210 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
323 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 ...
3
votes
1answer
133 views

Third party lead generation service scope access for creating new leads

Background: We're a lead generation service. We sell the leads (as a subscription) to multiple customers. Many of our customers use Salesforce. I'm trying to create an app that will create/push new ...
6
votes
0answers
119 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": "...
2
votes
0answers
408 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
790 views

large bulk insert/delete using jsforce

When I'm trying to insertBulk a lot of records using jsforce, only 10k records get inserted (single bulk job is being registered). The same happen with bulkDelete, when piping query result to ...
2
votes
1answer
221 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=...
1
vote
0answers
165 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
202 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 ...
2
votes
1answer
266 views

Metadata Deploy from JSforce doesn't work in production

I have a managed package containing a VF page that uses JSForce to deploy a zipped package of metadata when a user clicks a button. Inside the package I'm trying to deploy is 2 classes and a trigger, ...
0
votes
1answer
628 views

Inserting a record with a Master-Detail type field into a custom object using JSforce

How can a record with Master-Detail type field be inserted into a Salesforce object using JSforce package in Node.js I have an object Email which is a child object of Person. Email contains a link to ...
0
votes
1answer
654 views

How to get full image URL of PhotoUrl in Contacts using jsforce

I use nodejs/jsforce to connect to Sf API. In the "Contacts" one of the fields is retrieved as a string path PhotoUrl:"/services/images/photo/003o.....AAV" But that's not very handy if I want to ...
0
votes
1answer
396 views

JSForce Visualforce connection

So I am writing a visualforce app that is trying to use the jsforce. But I am having issues testing the jsforce library on the visualforce page. Here is a test I am trying to run from the visualforce ...
0
votes
0answers
299 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', ...
5
votes
1answer
1k views

What is the difference between JSFORCE and SFORCE?

What is the difference between JSFORCE and SFORCE?
2
votes
0answers
183 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. ...
0
votes
0answers
127 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 ...
1
vote
1answer
871 views

Best practice for reconnecting with jsforce?

The below is working really well, but every now and then it times out after awhile with this error: [Error: Invalid URI "/services/data/v37.0/sobjects see: https://github.com/jsforce/jsforce/issues/...
0
votes
1answer
166 views

jsforce-ajax-proxy always runs into timeout on Update and Create

Im using jsForce to communicate with salesforce from my web app. The app has a node.js based webserver where I included jsforce-ajax-proxy to circumvent CORS issues. Querying works fine but if I try ...
0
votes
0answers
419 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://...
3
votes
2answers
660 views

Jsforce in Lightning Component controller

Can we use JsForce in Lightning component? I need to Describe SObject i.e., retrieve Field data types for an object in lightning component helper. Would like to check if I can use JsForce instead of ...
3
votes
1answer
3k views

How to retrieve all available page layouts for an object?

I'm using the jsforce node package and I've tried the following: conn.metadata.retrieve( { apiVersion: '38.0', unpackaged: { types: [ { ...
3
votes
0answers
714 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: ...
1
vote
1answer
437 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' }); ...
4
votes
1answer
715 views

Invoking metadata API call using JSFORCE

Consider: <apex:page applyHtmlTag="true"> <apex:includeScript value="{!$Resource.Jsforce}"/> <input type="file" id="input"></input> <script type="text/...
1
vote
0answers
174 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/
3
votes
1answer
745 views

Best way to automate updating contact emails in sandboxes post refresh?

I'm looking for a way to automate the process of updating emails of all active contacts in sandboxes (mask them with the .dev or .test). Number of records to update after filtering: 900,000 Things I'...
4
votes
1answer
2k views

How to call Standard REST service in POST request using JSforce?

I am using JSforce, a module of Node.js for Salesforce. The login credentials are obviously not correct in this script but they are correct in original script and they are working fine. Here is app.js ...
3
votes
1answer
547 views

Problem with JSForce

I am trying to access the REST API using JSForce. I am connecting fine via OAuth, signing in and being redirected to where I need to be with my access token, etc. After that I am trying to access the ...
0
votes
2answers
241 views

Is JSforce safe to use?

I saw a JSForce code example on another site. It looks like one put their username and password in the code. Did I get that correct or is there a way to connect to SF without risking security? Can ...
0
votes
1answer
709 views

Streaming API not working with JSForce after token refresh

I'm currently trying to get my application running on Heroku to listen for events from the Streaming API, but have had no success. The application works fine when I'm testing it locally against my org ...