-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy path_sfB2CClientIDGet.js
More file actions
28 lines (25 loc) · 898 Bytes
/
_sfB2CClientIDGet.js
File metadata and controls
28 lines (25 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
'use strict';
// Initialize required modules
const sObjectAPIs = require('../../lib/apis/sfdc/sObject');
/**
* @function _sfB2CClientIDGet
* @description Attempts to retrieve a B2C ClientID record
*
* @param {connection} authConnection Represents the connection that should be used to perform the getQuery
* @param {Object} environmentDef Represents the already-validated environment details to use when performing the actions
* @returns {Promise} Returns the results of the B2C ClientID definition attempt
*/
module.exports = (authConnection, environmentDef) => sObjectAPIs.search(
authConnection,
`
SELECT Id,
Name,
Is_Active__c,
JWT_Certificate_Name__c
FROM B2C_Client_ID__c
WHERE Name = '${environmentDef.b2cClientId}'
ORDER
BY LastModifiedDate
LIMIT 1
`
);