Skip to content

Instantly share code, notes, and snippets.

//Adapter class for b2b_QueryBuilder
public with sharing class QueryBuilder {
private b2b_QueryBuilder builder;
private Schema.SObjectType sobjectType;
private String conditionLogic;
private List<String> fields = new List<String>();
private List<String> conditionList = new List<String>();
private List<String> orderByList = new List<String>();
<apex:page standardController="Case" lightningStylesheets="true" extensions="CaseTRAddendumExtension" showHeader="false" applyHtmlTag="false">
<apex:slds/>
<div>
<apex:form>
<apex:pageBlock>
<apex:pageBlockSection columns="2">
<apex:sectionHeader title="{!$Label.Create_Addendum_for_Case} {!Case.CaseNumber}" subtitle="{!$Label.Are_you_sure_you_want_to_create_an_addendum}?"
/>
<apex:page standardController="Case" lightningStylesheets="true" extensions="CaseTRAddendumExtension" showHeader="false" applyHtmlTag="true" applyBodyTag="false">
<head>
<apex:slds/>
</head>
<body class="slds-scope">
<apex:form>
<apex:pageBlock>
<apex:sectionHeader title="{!$Label.Create_Addendum_for_Case} {!Case.CaseNumber}" subtitle="{!$Label.Are_you_sure_you_want_to_create_an_addendum}?"
/>
@vspruyt-sol
vspruyt-sol / Exec_Anon.cls
Created June 19, 2020 07:27
Google coordinates tot Lambert 72
double lat = 50.3803887;
double lng = 4.9853501;
double LongRef = 0.076042943;
double bLamb = 6378388 * (1 - (1 / 297));
double aCarre = Math.pow(double.valueOf(6378388.0), double.valueOf(2.0));
double eCarre = (aCarre - Math.Pow(bLamb, double.valueOf(2.0))) / aCarre;
double KLamb = 11565915.812935;
double nLamb = 0.7716421928;
<html>
<head>
<apex:slds />
<script>
handleLoad = () => {
const labelArgument = "{!$ObjectType.Sales_Unit__c.labelPlural}";
const deleteConfirmed = confirm(`{!$Label.Confirm_Delete}`);
if (deleteConfirmed) {
confirmDelete();
#include <SPI.h>
#include <Ethernet.h>
EthernetClient client;
unsigned long byteCount = 0;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
char server[] = "collabyrinth.be";
// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192, 168, 1, 39);
public class MyClass {
@AuraEnabled
public Milestone__c milestone { get; set; }
@AuraEnabled
public List<Deliverable__c> deliverables { get; set; }
public MyClass(){}
}
public class MyClass {
@AuraEnabled
public Milestone__c milestone { get; set; }
@AuraEnabled
public List<Deliverable__c> deliverables { get; set; }
public MyClass(){}
}
@vspruyt-sol
vspruyt-sol / computedProperty.js
Last active March 9, 2020 13:17
Computed property vs overhead
@track arrayHasItems = false
@track theArray = [];
//Computed
get arrayHasItemsComputed()
{
return this.theArray.length > 0;
}
//Not computed
@vspruyt-sol
vspruyt-sol / Solution.cls
Last active February 24, 2020 17:43
Unit test: Internal Salesforce Error
//Throws Internal Salesforce Error
try {
insert new ContentDocumentLink();
} catch (Exception exceptionInstance){
}
//Deploys without errors
try {
ContentVersion cv = new ContentVersion();