Skip to content

Instantly share code, notes, and snippets.

View rsoesemann's full-sized avatar

Robert Sösemann rsoesemann

  • https://bit.ly/robert-gpt
  • Tübingen, Germany
  • 03:33 (UTC -12:00)
  • X @rsoesemann
View GitHub Profile
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;
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();
@mattandneil
mattandneil / CustomMetadataClient.java
Last active February 5, 2020 16:09
Custom Metadata webservice client
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());