This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The regex for a SF ID. | |
| * @type {RegExp} | |
| * @const | |
| */ | |
| var ID_REGEX = /^[0-9a-zA-Z]{15}([0-9a-zA-Z]{3})?$/; | |
| /** | |
| * Array used to expand a SF ID from 15 to 18 characters. | |
| * @type {Array.<String>} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * getDependentPicklistOptions | |
| * by Benj Kamm, 2012 | |
| * (inspired by http://iwritecrappycode.wordpress.com/2012/02/23/dependent-picklists-in-salesforce-without-metadata-api-or-visualforce/) | |
| * CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/us/) | |
| * | |
| * Build an Object in which keys are valid options for the controlling field | |
| * and values are lists of valid options for the dependent field. | |
| * | |
| * Method: dependent PickListEntry.validFor provides a base64 encoded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright Sean Kemplay 2013 | |
| // License MIT | |
| var appendParams = function (memo, values, key, list) { | |
| params = memo; | |
| // Cover off use cases | |
| if (values) { | |
| if (values.constructor === Array && values.length > 0) { | |
| for (var i = 0; i < values.length; i++) { | |
| if (i > 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express'); | |
| var rpcMethods = require('./methods.js'); | |
| var app = module.exports = express.createServer(); | |
| // Configuration |