This file contains 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
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; | |
import java.net.URI; | |
import java.net.URLEncoder; | |
import java.io.UnsupportedEncodingException; | |
This file contains 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
const express = require("express"), | |
dotenv = require("dotenv"), | |
jsforce = require("jsforce"), | |
bodyParser = require("body-parser"), | |
session = require("express-session"), | |
decode = require("salesforce-signed-request"); | |
dotenv.config(); | |
const app = express(); |
This file contains 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
public class CustomMetadataClient { | |
static public Database.UpsertResult upsertMetadata(SObjectType objectType, Map<SObjectField,Object> record) { | |
return upsertMetadata(objectType, new List<Map<SObjectField,Object>>{record})[0]; | |
} | |
static public List<Database.UpsertResult> upsertMetadata(SObjectType type, List<Map<SObjectField,Object>> metadatas) { | |
if (Test.isRunningTest()) Test.setMock(WebServiceMock.class, new UpsertMetadataMock()); |