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
1answer
33 views

Cost of bulkUpdate

I'm using jsforce to perform a bulkUpdate on Records. I have a broker Node App that retrieves records from an external API. It then needs to update said records to Salesforce. This Node app will ...
1
vote
1answer
30 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 ...
0
votes
1answer
20 views

Get email from personal information from User Object?

I need to fetch email of the user which they place under personal information but I seem to be getting back all the contact's emails of the user. So for the above example, I need user@abc.ai. My code ...
0
votes
1answer
44 views

How to find if user is authenticating a Production or Sandbox when processing auth code received on Callback url?

I am working on a nodejs app using jsforce to authenticate users their Salesforce org with nodejs app and this is how it works at high level: User launches nodejs app and login screen is shown with ...
0
votes
1answer
19 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
94 views

Having a bulk api issue when trying to execute on linux. I am getting Error: connect ETIMEDOUT 13.110.30.13:443

I am wondering if there is something happening with salesforce? When I'm trying to run bulk query with jsforce it is giving me following error but sometimes it works fine. { Error: connect ETIMEDOUT ...
1
vote
1answer
98 views

jsforce Bulk API query is not returning records in proper json format?

I am working on a nodejs app that uses jsforce library to query data using Bulk API and the format of data returned doesn't seem to be proper json formatted. Here is a simple reproducible example: // ...
0
votes
0answers
28 views

JSforce login to salesforce from Chrome Extension [duplicate]

My goal is to listen for Steaming API events from Chrome Extension. In order to do that, obviously i must log in first and get a token. As embarrassing as it is, i am stuck at User Login phase. I have ...
0
votes
0answers
39 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
1answer
83 views

Trouble updating a single custom field in a custom object.(JSForce)

Good afternoon, I'm having a bit of trouble updating a record using JSForce. I would like to update a single field named "BrightPath_Result__c", which is a field of "Deal__c". It ...
0
votes
1answer
58 views

Calling REST APIs without storing SF credentials on the client side

I have 5 orgs that I want to be linked to my web server. My server gets POST calls from different Facebook accounts. These then have to be routed to Salesforce orgs according to the business that ...
2
votes
2answers
148 views

Download ContentVersion Object as JPG using JSForce

I am trying to download a JPG file stored as an attachment in Salesforce, to the local machine. I have a URL that works correctly when using a GET request in Workbench. When I try to do the same in ...
1
vote
1answer
92 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
63 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
1answer
155 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 : { ...
0
votes
0answers
145 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
32 views

How to Renew Visualforce Page Session with JSforce

I have a visualforce page that is running with jsforce. I use it to query, create, update and deleted records in my page without reloading the page. For a longer period or idle time, I started to ...
0
votes
0answers
36 views

Update ApexClass in Sandbox with JSforce [duplicate]

I'm trying to use JSforce library to create/update class using the tooling object. Please note that it is only in sandbox, I do know that in production org it won't work. Anyway, I'm able to create ...
0
votes
0answers
25 views

Issue with JSForce Login - origin 'http://localhost:3001' has been blocked by CORS policy [duplicate]

I am trying JSforce for the first time. I created the OOTB lwcdev node app and then just adding the login method as per the documentation . import { createElement } from 'lwc'; import MyApp from '...
0
votes
1answer
106 views

How do I get the logs (results) of executing anonymous Apex code in jsforce?

I have been trying to execute the following Apex code in jsforce (Node.js): var apexBody = "System.debug(UserInfo.isMultiCurrencyOrganization());"; conn.tooling.executeAnonymous(apexBody, function(...
1
vote
2answers
315 views

How do I get correct base64 data present in VersionData field in ContentVersion through jsforce?

I am using jsforce to query VersionData field in ContentVersion object. However, it returns me the URL to the base64 data instead of the actual data. If I make a GET request to the URL (using the ...
1
vote
0answers
23 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 ...
0
votes
0answers
144 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
28 views

SOQL queries with date literals

I am trying to send a SOQL query to salesforce using jsforce. I would like to select all opportunities that are closing within the next year. I firstly tried to use a javascript date but I get an ...
0
votes
0answers
203 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 (...
1
vote
1answer
490 views

I want to cover the onBlur event in javascript by writing JEST test case in LWC

In my html component i've used an onBlur attribute in div. While writing the test case for the same i am unable to cover the javascript method which I've called in html. My div looks like this <...
1
vote
1answer
251 views

JSForce retreiving VersionData problem [duplicate]

The task: We have over 1500 .msg files in Salesforce, which are Outlook containers for Mail conversations plus attachments. The idea is to build a script, which downloads all files, extract each ...
0
votes
0answers
27 views

Error pushing Time from WebForm to SalesForce (Using JSForce as connector and direct REST to Push) [duplicate]

I am building a NodeJS WebApp, that serves up a form, User fills it out, submits it, and then pushes the data from the form to SalesForce. The App uses JSForce for Authentication, and then it uses a ...
0
votes
1answer
59 views

Filter quotes by owner division SOQL

I am using JsForce to query my orgs salesforce data. I am trying to select all quotes that belong to salespeople from my division. I am very new to SOQL and SalesForce so the best I have come up with ...
1
vote
1answer
30 views

Where does this Column come from (In Sql Query)?

I came across a Query that is very useful if I could figure out where a column name is being called from. (So I can edit and repurpose). The Query is: Select o.Owner.Username, o.OwnerId, o.Account....
1
vote
0answers
162 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, ...
2
votes
1answer
181 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
150 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
234 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
71 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
692 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
64 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
247 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
1answer
181 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
1k 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
357 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 = ...
2
votes
1answer
730 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) { /...
1
vote
2answers
1k 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
1answer
125 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
396 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
517 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
88 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
50 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
494 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
477 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 ...