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 static Map<String, String> upsertData(Map<String, String> send) { | |
// Response payload | |
// | |
Map<String, String> resp = new Map<String, String> (); | |
resp.put('__campaign', send.get('__campaign')); | |
resp.put('__form', send.get('__form')); | |
// Build a list of fields in the form | |
// | |
String[] formFields = selectFormDataFields(true); |
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
<div id="google_translate_element"><div class="skiptranslate goog-te-gadget" dir="ltr" style=""><div id=":0.targetLanguage" class="goog-te-gadget-simple" style="white-space: nowrap;"><img src="https://www.google.com/images/cleardot.gif" class="goog-te-gadget-icon" alt="" style="background-image: url("https://translate.googleapis.com/translate_static/img/te_ctrl3.gif"); background-position: -65px 0px;"><span style="vertical-align: middle;"><a aria-haspopup="true" class="goog-te-menu-value" href="javascript:void(0)"><span>Select Language</span><img src="https://www.google.com/images/cleardot.gif" alt="" width="1" height="1"><span style="border-left: 1px solid rgb(187, 187, 187);"></span><img src="https://www.google.com/images/cleardot.gif" alt="" width="1" height="1"><span aria-hidden="true" style="color: rgb(155, 155, 155);">▼</span></a></span></div></div></div><script type="text/javascript"> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({pageLanguage: 'en', i |
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
@RemoteAction | |
public static List<AttachmentWrapper> getAttachedDocsList(String pParentOpportunityId) { | |
/* | |
Set<Id> parentDocIdSet = new Set<Id>(); | |
for(Document__c docObj : opp.Documents__r) { | |
parentDocIdSet.add(docObj.Linked_Document__c); | |
} | |
system.debug('>>> parentDocIdSet: '+parentDocIdSet); | |
*/ |
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
// Class which contains useful utility methods required across classes | |
public class Utils { | |
public static final String OBJECTNAME = 'RELATIONSHIP_OBJECT'; | |
public static final String FIELDNAME = 'RELATIONSHIP_FIELD'; | |
public static final String QUERY_TEMPLATE = 'SELECT {0} FROM {1} {2}'; | |
public static final String NESTED_QUERY = '({0})'; | |
public static final String COMMA_SEPARATOR = ', '; | |
public static final String FIELD_ID = 'Id'; |
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 RESTErrorHandler { | |
public static final String RESPONSENULL = 'Response null'; | |
public static final String UNKNOWN_ERROR = 'Unknown error'; | |
public static final String SERVER_ERROR = 'Server side error'; | |
public static final String CLIENT_ERROR = 'Client request error'; | |
public static final String REDIRECTION = 'Redirection'; | |
public static final String SUCCESS = 'Success'; | |
public static final String INFO_RESPONSE = 'Informational response'; |
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 with sharing class SObjectClone { | |
public final Map<String, Id> recordTypeMap; | |
public Map<String,Map<String,String>> relationshipDetailMap; | |
public Schema.SObjectType objectType; | |
public Schema.FieldSet fieldSet; | |
public Set<String> relationshipNameSet; | |
public CloneInitializer initializer; | |
public Id cloneRecordTypeId; |
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 org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.openqa.selenium.support.FindBy; | |
import org.openqa.selenium.WebElement; | |
import com.github.webdriverextensions.junitrunner.WebDriverRunner; | |
import com.github.webdriverextensions.junitrunner.annotations.*; | |
import static com.github.webdriverextensions.Bot.*; | |
import static java.util.concurrent.TimeUnit.SECONDS; |
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
// Returns a map of active, user-available RecordType IDs for a given SObjectType, | |
// keyed by each RecordType's unique, unchanging DeveloperName | |
public static Map<String, Id> getRecordTypeMapForObjectGeneric(Schema.SObjectType token) { | |
// Do we already have a result? | |
Map<String, Id> mapRecordTypes = rtypesCache.get(token); | |
// If not, build a map of RecordTypeIds keyed by DeveloperName | |
if (mapRecordTypes == null) { | |
mapRecordTypes = new Map<String, Id>(); | |
rtypesCache.put(token,mapRecordTypes); | |
} else { |
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 OpportunityClone { | |
//get recordtypeids for all opportunity records | |
static final Map<String, Id> opportunityRecordTypeMap = Utils.getRecordTypeMapForObjectGeneric(Opportunity.SObjectType); | |
static final Map<String,Map<String,String>> opportunityRelationshipDetailMap = Utils.getRelationshipDetails(Opportunity.SObjectType); | |
public static final String FILTER_CLAUSE = ' WHERE ID IN :recordIdList'; | |
public static CloneConfig config; | |
public class CloneConfig { |
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
<apex:page renderAs="pdf"> | |
PDF Content Goes Here... | |
</apex:page> |