Usage :
var redirectURL = getRedirectURL(redirectPage,linkType);
var redirectTo_url = redirectTo('{!recordId}',redirectURL, openInSubtab, actionLabel, linkType );
Usage :
var redirectURL = getRedirectURL(redirectPage,linkType);
var redirectTo_url = redirectTo('{!recordId}',redirectURL, openInSubtab, actionLabel, linkType );
$(document).ready(function () { | |
$('.star').on('click', function () { | |
$(this).toggleClass('star-checked'); | |
}); | |
$('.ckbox label').on('click', function () { | |
$(this).parents('tr').toggleClass('selected'); | |
}); |
source "https://rubygems.org" | |
# Hello! This is where you manage which Jekyll version is used to run. | |
# When you want to use a different version, change it below, save the | |
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: | |
# | |
# bundle exec jekyll serve | |
# | |
# This will help ensure the proper Jekyll version is running. | |
# Happy Jekylling! |
ApexClass[] testClasses = [SELECT Id FROM ApexClass WHERE Name LIKE 'EditOpportunityServiceTest']; | |
ApexTestQueueItem[] queueItems = new List<ApexTestQueueItem>(); | |
for (ApexClass cls : testClasses) | |
queueItems.add(new ApexTestQueueItem(ApexClassId=cls.Id)); | |
//it will submit them for execution | |
insert queueItems; | |
Id recordId = queueItems[0].Id; | |
queueItems = [Select Id,Status,ExtendedStatus,TestRunResultID from ApexTestQueueItem Where Id=: recordId]; | |
System.debug(queueItems[0].TestRunResultID); | |
Id runResultId = queueItems[0].TestRunResultID; |
interface TestDataGenerator { | |
public SObject createRecord(String objectName); | |
public List<String> getRequiredFields(String objectName); | |
public Map<String,String> getTestData(String objectName); | |
} | |
public class DefaultTestDataGenerator implements TestDataGenerator { | |
} |
@RestResource(urlMapping='/echo/*') | |
global class EchoService { | |
@HttpGet | |
global static String helloWorld() { | |
return 'Hello, Eternus!'; | |
} | |
@HttpPost | |
global static String echo() { |
/* | |
How to use RestUtility | |
1. RestUtility.URL_ENCODE_PARAMS to true if you wish to encode the url parameters, | |
by default they are not encoded. | |
2. getAuthorizationHeader(String username,String password) to use basic authentication method. | |
*/ | |
public with sharing class RestUtility { | |
public static final String BASIC = 'Basic '; | |
public static Boolean URL_ENCODE_PARAMS = false; |
frn.formatMoney = function(){ | |
$("[format-currency]").each(function(){ | |
var currency = function(amount){ | |
return amount.toLocaleString('en-US', { style: 'currency', currency: 'USD' }); | |
} | |
try{ | |
if( $(this).is("input") ){ | |
var amount = parseFloat( $(this).val() ); |
public Map<String,String> handleDateTypes(Map<String,String> recordMap,Type classType){ | |
List<String> dateTimeFields = getFieldsOfType( | |
classType | |
, Schema.SOAPType.DATE | |
); | |
for( String fieldKey : recordMap.keySet() ){ | |
if( dateTimeFields.contains(fieldKey.toLowerCase()) ){ | |
String dateValue = recordMap.get(fieldKey); |
public Map<String,String> handleDateTypes(Map<String,String> recordMap,Type classType){ | |
List<String> dateTimeFields = getFieldsOfType( | |
classType | |
, Schema.SOAPType.DATE | |
); | |
for( String fieldKey : recordMap.keySet() ){ | |
if( dateTimeFields.contains(fieldKey.toLowerCase()) ){ | |
String dateValue = recordMap.get(fieldKey); |