Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ limit 2
<li>msg.payload.records - the array of records returned from the query.</li>
</ul></p>
<p>The query can be configured in the node, however if left blank, the query should be set in an incoming message on <code>msg.query</code>.</p>
<p>By default the query will return the first 2,000 records from the query result. If you wish to return the full result set then tick the 'Fetch All Records' checkbox.</p>
<p>See the <a href="https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl">Salesforce SOQL documentation</a> for more information.</p>

<h3>SOSL</h3>
Expand Down
2 changes: 1 addition & 1 deletion dml.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module.exports = function(RED) {
node.status({});
}).error(function(err) {
node.status({fill:"red",shape:"dot",text:"Error!"});
node.error(err);
node.error(err, msg);
});

});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-salesforce",
"version": "0.0.5",
"version": "0.0.6",
"description": "A set of Node-RED nodes to interact with Salesforce and Force.com.",
"author": {
"name": "Jeff Douglas",
Expand Down
7 changes: 6 additions & 1 deletion soql.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
defaults: {
name: {value:""},
query: {value:""},
connection: {value:"", type:"connection-config", required: true}
connection: {value:"", type:"connection-config", required: true},
fetchAll: {value:false}
},
inputs:1,
outputs:1,
Expand All @@ -29,6 +30,10 @@
<label for="node-input-query"><i class="fa fa-database"></i> Query</label>
<textarea id="node-input-query" style="width:300px"></textarea>
</div>
<div class="form-row" style="white-space:nowrap">
<label for="node-input-fetchAll"><i class="fa fa-list"></i> Fetch all result records</label>
<input type="checkbox" id="node-input-fetchAll" style="position:absolute;left:20px">
</div>
</script>

<script type="text/x-red" data-help-name="soql">
Expand Down
4 changes: 2 additions & 2 deletions soql.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function(RED) {

// auth and run query
org.authenticate({ username: this.connection.username, password: this.connection.password }).then(function(){
return org.query({ query: config.query })
return org.query({ fetchAll: config.fetchAll, query: config.query });
}).then(function(results) {
msg.payload = {
size: results.totalSize,
Expand All @@ -37,7 +37,7 @@ module.exports = function(RED) {
node.status({});
}).error(function(err) {
node.status({fill:"red",shape:"dot",text:"Error!"});
node.error(err);
node.error(err, msg);
});

});
Expand Down
2 changes: 1 addition & 1 deletion sosl.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function(RED) {
node.status({});
}).error(function(err) {
node.status({fill:"red",shape:"dot",text:"Error!"});
node.error(err);
node.error(err, msg);
});

});
Expand Down
2 changes: 1 addition & 1 deletion streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = function(RED) {

org.authenticate({ username: this.connection.username, password: this.connection.password }, function(err, oauth) {

if(err) node.err(err);
if(err) return node.error(err, msg);

var client = org.createStreamClient();
var stream = client.subscribe({ topic: config.pushTopic });
Expand Down