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 class YQLBridge { | |
@future (callout=true) | |
public static void searchGoogleBooks(String bookId) { | |
Book__c book = [SELECT Name, Id FROM Book__c WHERE Id=:bookId]; | |
Http http = new Http(); | |
HttpRequest req = new HttpRequest(); | |
req.setEndpoint('https://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20google.books%20WHERE%20q%3D%22' | |
+book.Name+ | |
'%22%20AND%20maxResults%3D1&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&format=json'); |
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
trigger CreateRenewal on Opportunity (after insert, after update) { | |
List<Opportunity> renewals = new List<Opportunity>(); | |
List<Opportunity> closedOpp = Trigger.new; | |
RecordType renewalRecordType = [SELECT Id FROM RecordType WHERE Name LIKE '%Renewal%']; | |
for(Opportunity opp: closedOpp){ | |
if(opp.IsClosed){ | |
Opportunity newOpp = new Opportunity(); | |
newOpp.AccountId = opp.AccountId; | |
newOpp.Name = opp.Name+'Renewal'; |
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
Still new to Salesforce? First read some these good workbooks : https://wiki.developerforce.com/page/Force.com_workbook | |
Watch some Salesforce training videos : https://www.youtube.com/playlist?list=PL6747B4DAE356E17C | |
This tips is also good to read : | |
http://agilecloudconsulting.blogspot.jp/2013/10/how-to-become-certified-salesforcecom.html | |
http://salesforce-certification-notes.blogspot.jp/?view=magazine | |
Ready to go? Take some exam questions practice : | |
http://bulkified.com/Certifications/?certificationId=1 | |
http://www.abetterstudyguide.com/ABSG/ | |
And the last read carefully the study guide : http://certification.salesforce.com/SG_CertifiedAdministrator.pdf | |
If you still don't have a confidence, study more. |
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:selectList value="{!item}" size="1"> <!-- must have declared it with size=1 in order to become dropdown list --> | |
<apex:selectOptions value="{!itemList}"/> <!-- for detail see OptionController.cls.cls file --> | |
</apex:selectList> |
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 OptionController { | |
public List<CustomObject__c> ListOfItems {get;set;} | |
public List<SelectOption> getItems() { | |
List<SelectOption> options = new List<SelectOption>(); | |
for(CustomObject__c sObj: ListOfItems) { | |
options.add(new SelectOption(sObj.Id, sObj.Name)); | |
} | |
return options; | |
} |
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
<select id="test"> | |
<option id="test1">test1</option> | |
<option id="test2">test2</option> | |
<option id="test3">test3</option> | |
<option id="test4">test4</option> | |
<option id="test5">test5</option> | |
</select> |
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
@implementation NSApplication (Relaunch) | |
- (void)relaunchAfterDelay:(float)seconds | |
{ | |
NSTask *task = [[[NSTask alloc] init] autorelease]; | |
NSMutableArray *args = [NSMutableArray array]; | |
[args addObject:@"-c"]; | |
[args addObject:[NSString stringWithFormat:@"sleep %f; open \"%@\"", seconds, [[NSBundle mainBundle] bundlePath]]]; | |
[task setLaunchPath:@"/bin/sh"]; | |
[task setArguments:args]; |
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
- (BOOL) trackMouse:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)flag | |
{ | |
// Check if the button was hit. | |
int hitType = [self hitTestForEvent:[NSApp currentEvent] inRect:cellFrame ofView:controlView]; | |
BOOL isButtonClicked = hitType == (NSCellHitContentArea | NSCellHitTrackableArea); | |
if (!isButtonClicked) return YES; | |
// Ignore events other than mouse down. | |
if ([event type] != NSLeftMouseDown) return YES; | |
NewerOlder