Skip to content

Instantly share code, notes, and snippets.

@miragedeb
miragedeb / DuplicateQARelController
Last active August 29, 2015 14:17
DuplicateQARelController
public with sharing class DuplicateQARelController{
//Declare the variables to be used
public List<QA_Release__c> releases {get;set;}
private Id releaseClientId;
private final QA_Release__c qa;
//Put all code inside constructor since it will be initialized when page is rendered
public DuplicateQARelController(ApexPages.StandardController stdController) {
@miragedeb
miragedeb / QADuplicateAlert
Last active August 29, 2015 14:17
QADuplicateAlertPage
<apex:page standardcontroller="QA_Release__c" extensions="DuplicateQARelController" showHeader="false" sidebar="false">
<apex:image value="{!$Resource.img2}" styleClass="logo" width="25%"/>
<apex:form >
<apex:pageBlock title="Multiple QA tasks alert!">
<apex:outputPanel styleClass="rules">
@miragedeb
miragedeb / gist:c758bce9f4200519dd33
Last active August 29, 2015 14:16
Test Class for Extravagant Record Creation
@isTest
public class TestLimitCasesBulk {
static testMethod void testLimitCasesBulk() {
//Principle #1: Create records from scratch
//1. Create the custom setting
Max_Cases__c maxNoCases = new Max_Cases__c();
maxNoCases.MaxCases__c = 250;