Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
0answers
50 views

How to do POST after getting authorisation token and instance url (in Java or Javascript)?

I am trying to hit Apex classes directly via a simple web-page interface. I have a requirement where I am supposed to directly hit Apex classes and get results after performing CRM operations. The ...
1
vote
2answers
44 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
26 views

JSForce - Updating picklist value API names

I'm trying to automate with JSForce a manual step which consists on renaming the API name of some pick-list values but doesn't look like it's possible. Tried update with conn.metadata.update('...
0
votes
0answers
20 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
28 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
26 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
84 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
30 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
36 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
399 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
117 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
191 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
385 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
113 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
141 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 ...
0
votes
0answers
147 views

JSForce : OAuth2 Flow - refreshToken is not defined

I am developing an application with the Ionic Framework, and making a connection to Salesforce via an OAuth Flow, thanks to an Express Server deployed on Heroku. After the user has logged in with ...
1
vote
0answers
143 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
203 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
82 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
95 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
319 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, ...
0
votes
0answers
74 views

how to use jsforce library in custom lightning component? [duplicate]

I'm used jsforce like static resources. cmp: <ltng:require scripts="{!$Resource.JSforceMetadata}"/> Controller.js: var action = component.get("c.getAccessToken"); action....
2
votes
1answer
487 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
163 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
148 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
154 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
1answer
211 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
466 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
502 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
315 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
266 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
986 views

What is the difference between JSFORCE and SFORCE?

What is the difference between JSFORCE and SFORCE?
2
votes
0answers
164 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
109 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
510 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
146 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
257 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
523 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
2k 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: [ { ...
2
votes
0answers
566 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
361 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
588 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
166 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
600 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
479 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
199 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
603 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 ...
0
votes
1answer
251 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 ...
3
votes
0answers
65 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,...