Skip to content

Instantly share code, notes, and snippets.

@adrianmi8
adrianmi8 / Mass Ship to Contacts.js
Last active April 14, 2016 11:28
Mass Ship to Contacts
public with sharing class NewShipmentsContactsController {
private ApexPages.StandardSetController standardController;
private Id bulkShipmentId;
private String batchId;
private static final String SERVICE_TYPE_FEDEX = 'FedEx';
private final BulkShipmentSettings__c settings;
private Set<Id> contactsIds;
public String statusMessage {get; set;}
public static final String workingObject = 'Contact';
@adrianmi8
adrianmi8 / Mass Ship to Contacts - VisualForce.xml
Created April 14, 2016 11:34
Mass Ship to Contacts - VisualForce
<apex:page standardController="Contact" extensions="NewShipmentsContactsController"
recordSetVar="Contact" action="{! processBulkShipment }">
<apex:form >
<apex:outputPanel id="blockId">
<apex:pageMessages escape="false"/>
<apex:image url="{! URLFOR($Resource.Spinner) }" rendered="{! startPoller }"/>
<apex:outputLink value="/003" rendered="{! NOT(startPoller) }">Back to Contacts</apex:outputLink>
<apex:actionPoller action="{! checkBatchStatus }" reRender="blockId" interval="5"
enabled="{!startPoller}"/>
</apex:outputPanel>
@adrianmi8
adrianmi8 / One Click Case Label Generation - Visualforce page.xml
Created April 14, 2016 11:35
One Click Case Label Generation - Visualforce page
<apex:page standardController="Case" extensions="NewShipmentCaseController" action="{! processBulkShipment }">
<apex:form >
<apex:outputPanel id="blockId">
<apex:pageMessages escape="false"/>
<apex:image url="{! URLFOR($Resource.Spinner) }" rendered="{! startPoller }"/>
<apex:outputLink value="/{! caseId }" rendered="{! NOT(startPoller) }">Back to Case</apex:outputLink>
<apex:actionPoller action="{! checkBatchStatus }" reRender="blockId" interval="5"
enabled="{!startPoller}"/>
</apex:outputPanel>
</apex:form>
@adrianmi8
adrianmi8 / One Click Case Label Generation.js
Created April 14, 2016 11:36
One Click Case Label Generation
public with sharing class NewShipmentCaseController {
private ApexPages.StandardController standardController;
private Id bulkShipmentId;
private String batchId;
private static final String SERVICE_TYPE_FEDEX = 'FedEx';
private final BulkShipmentSettings__c settings;
public Id caseId {get; set;}
public Case currentCase {get; set;}
public String statusMessage {get;set;}
@adrianmi8
adrianmi8 / UPS - mass ship to contacts.xml
Created April 14, 2016 11:37
UPS - mass ship to contacts
<apex:page standardController="Contact" extensions="NewUPSShipmentsContactCtrl"
recordSetVar="Contact" action="{! processBulkShipment }">
<apex:form >
<apex:outputPanel id="blockId">
<apex:pageMessages escape="false"/>
<apex:image url="{! URLFOR($Resource.Spinner) }" rendered="{! startPoller }"/>
<apex:outputLink value="/003" rendered="{! NOT(startPoller) }">Back to Contacts</apex:outputLink>
<apex:actionPoller action="{! checkBatchStatus }" reRender="blockId" interval="5"
enabled="{!startPoller}"/>
</apex:outputPanel>
@adrianmi8
adrianmi8 / UPS - mass ship to contacts.js
Created April 14, 2016 11:38
UPS - mass ship to contacts
public with sharing class NewUPSShipmentsContactCtrl {
private ApexPages.StandardSetController standardController;
private Id bulkShipmentId;
private String batchId;
private static final String SERVICE_TYPE = 'UPS';
private final BulkShipmentSettings__c settings;
private Set<Id> contactsIds;
public String statusMessage {get; set;}
public static final String workingObject = 'Contact';
@adrianmi8
adrianmi8 / UPS - create from case.xml
Created April 14, 2016 11:39
UPS - create from case
<apex:page standardController="Case" extensions="NewUPSShipmentCaseController" action="{! processBulkShipment }">
<apex:form >
<apex:outputPanel id="blockId">
<apex:pageMessages escape="false"/>
<apex:image url="{! URLFOR($Resource.Spinner) }" rendered="{! startPoller }"/>
<apex:outputLink value="/{! caseId }" rendered="{! NOT(startPoller) }">Back to Case</apex:outputLink>
<apex:actionPoller action="{! checkBatchStatus }" reRender="blockId" interval="5"
enabled="{!startPoller}"/>
</apex:outputPanel>
</apex:form>
@adrianmi8
adrianmi8 / UPS - create from case.js
Created April 14, 2016 11:40
UPS - create from case
public with sharing class NewUPSShipmentCaseController {
private ApexPages.StandardController standardController;
private Id bulkShipmentId;
private String batchId;
private static final String SERVICE_TYPE = 'UPS';
private final BulkShipmentSettings__c settings;
public Id caseId {get; set;}
public Case currentCase {get; set;}
public String statusMessage {get;set;}
@adrianmi8
adrianmi8 / USPS - Mass Ship to Contacts.xml
Created April 14, 2016 11:41
USPS - Mass Ship to Contacts
<apex:page standardController="Contact" extensions="NewUSPSShipmentsContactCtrl"
recordSetVar="Contact" action="{! processBulkShipment }">
<apex:form >
<apex:outputPanel id="blockId">
<apex:pageMessages escape="false"/>
<apex:image url="{! URLFOR($Resource.Spinner) }" rendered="{! startPoller }"/>
<apex:outputLink value="/003" rendered="{! NOT(startPoller) }">Back to Contacts</apex:outputLink>
<apex:actionPoller action="{! checkBatchStatus }" reRender="blockId" interval="5"
enabled="{!startPoller}"/>
</apex:outputPanel>
@adrianmi8
adrianmi8 / USPS - Mass Ship to Contacts.js
Created April 14, 2016 11:41
USPS - Mass Ship to Contacts
public with sharing class NewUSPSShipmentCaseController {
private ApexPages.StandardController standardController;
private Id bulkShipmentId;
private String batchId;
private static final String SERVICE_TYPE = 'USPS';
private final BulkShipmentSettings__c settings;
public Id caseId {get; set;}
public Case currentCase {get; set;}
public String statusMessage {get;set;}