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
global with sharing class CPPBuilderRob { | |
public CPPBuilderRob() { | |
// Remember: @RemoteActions are static, hence controller has no state | |
} | |
@RemoteAction | |
global static CPP_Report_Poller GetReportGroups(string opportunityId) { | |
// Query from CPP_Report_Request__c |
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
static global List<Dom.XMLNode> getRSSFeed(string URL) { | |
Http h = new Http(); | |
HttpRequest req = new HttpRequest(); | |
// url that returns the XML in the response body | |
req.setEndpoint(url); | |
req.setMethod('GET'); | |
HttpResponse res = h.send(req); | |
Dom.Document doc = res.getBodyDocument(); | |
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
echo ${1%.*} | |
echo "Cleanup" | |
rm src-latest/classes/* | |
rm src-latest/pages/* | |
rm src-latest/components/* | |
echo "Moving files" | |
cp src/classes/${1%.*}.cls src-latest/classes/ | |
cp src/classes/${1%.*}.cls-meta.xml src-latest/classes/ |
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
security 2>&1 >/dev/null find-generic-password -ga $1 \ | |
|ruby -e 'print $1 if STDIN.gets =~ /^password: "(.*)"$/' |
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
. build.properties | |
if [ ${usekeychainaccess} == 'enabled' ] | |
then | |
shellpassword=$(~/bin/keychain.sh ${password}) | |
sed "s/${password}/${shellpassword}/" build.properties > new.properties | |
cp new.properties build.back | |
cp new.properties build.properties | |
fi | |
ant build-all |
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 os | |
import urlparse | |
import urllib | |
from restful_lib import Connection | |
consumer_key = 'CONSUMERKEY' | |
callback = 'https://login.salesforce.com/services/oauth2/success' | |
login_url = 'https://login.salesforce.com/services/oauth2/authorize?response_type=token&client_id='+consumer_key+'&redirect_uri='+callback | |
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 ApexJSONExample { | |
public ApexJSONExample() { | |
} | |
public void testSerialize() { | |
Flog__c f = new Flog__c(); | |
Dog__c dog = [SELECT ID, Name, Breed__c from Dog__c LIMIT 1]; | |
f.JSON__c = JSON.serialize(dog); |
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 function login():void { | |
var lr:LoginRequest = new LoginRequest(); | |
lr.username = 'YOUR USERNAME'; | |
lr.password = 'YOUR PASSWORD'; | |
lr.callback = new com.salesforce.AsyncResponder(doQuery,showError); | |
force.login(lr); | |
} | |
private function doQuery(result:LoginResult):void { |
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 showHeader="false" StandardController="Account"> | |
<script> | |
function changevalue(input) { | |
value = input.options[input.selectedIndex].value; | |
if(value == 'Customer - Channel') { | |
document.getElementById('{!$Component.myform.mypanel}').style.display = 'none'; | |
} else { | |
document.getElementById('{!$Component.myform.mypanel}').style.display = 'block'; | |
} | |
} |
OlderNewer