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
1
vote
1answer
31 views

jsforce query on ContentVersion returns the url rather than Base64 value

I am using jsforce for fetching ContentVersionData from a Node app. My query is SELECT VersionData FROM ContentVersion but instead of fetching the base64 value in VersionData field i m getting an url. ...
0
votes
1answer
15 views

Call Standard salesforce rest api using jsfoce

I am trying to write a simple node app to get the record count from various objects in salesforce. Following rest api gives the count for objects mentioned in the request /services/data/v45.0/limits/...
1
vote
1answer
42 views

Help with JSforce query - 'Bind variables only allowed in Apex code'

I'm trying to execute the following query using JSforce: conn.query('SELECT RecordId FROM UserRecordAccess WHERE UserId=:' + userId + 'AND HasReadAccess = true AND RecordId IN :' + listOfIds + ' ...
4
votes
0answers
46 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....
1
vote
1answer
132 views

How to download a attachment in browser using JSForce?

I am trying to download a Attachment using JSForce library. I am able to get body of attachment and download that file but somehow content of downloaded file is not correct and I am getting a corrupt ...
0
votes
1answer
16 views

How to use jsForce to call Datacloud.FindDuplicates.findDuplicates()?

I nedd do something like this: https://developer.salesforce.com/docs/atlas.en-us.210.0.apexcode.meta/apexcode/apex_class_Datacloud_FindDuplicates.htm#apex_class_Datacloud_FindDuplicates I also find ...
0
votes
1answer
52 views

invalid_grant: expired access/refresh token with refresh token included in JSForce

I am trying to build a server that will populate Salesforce through a front end website using Express JS with JSForce library. However, every time the access token expired, it does not refresh by ...
0
votes
0answers
19 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
71 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
487 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
113 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
249 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
112 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
580 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
75 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
76 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
181 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
223 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
58 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
451 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
274 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
321 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
586 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
233 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
236 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
224 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
355 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
167 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
124 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
425 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
850 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
231 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
167 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
214 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
280 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
664 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
688 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
420 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
302 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
185 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
133 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
938 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
176 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
454 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
716 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
757 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
470 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' }); ...