Skip to content

Instantly share code, notes, and snippets.

Taiki Yoshikawa tyoshikawa1106

Block or report user

Report or block tyoshikawa1106

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tyoshikawa1106
tyoshikawa1106 / e.force:navigateToSObjectDemo.js
Created Mar 15, 2015
e.force:navigateToSObject sample code
View e.force:navigateToSObjectDemo.js
createRecord : function (component, event, helper) {
var navEvt = $A.get("e.force:navigateToSObject");
navEvt.setParams({
"recordId": "00QB0000000ybNX",
"slideDevName": "related"
});
navEvt.fire();
}
View 01_ JSRemotingFileUpload.page
<apex:page standardController="Account" extensions="JSRemotingFileUploadController" sidebar="false" id="page">
<head>
<apex:includeScript value="https://code.jquery.com/jquery-2.1.4.min.js" />
<apex:includeScript value="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js" />
<apex:includeScript value="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular-animate.min.js" />
<apex:includeScript value="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" />
</head>
<body>
<div id="vf-page">
<apex:form id="form">
View CreateTaskEmailExample.cls
global class CreateTaskEmailExample implements Messaging.InboundEmailHandler {
global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email,
Messaging.InboundEnvelope env) {
Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();
String myPlainText= email.plainTextBody;
Task[] newTask = new Task[0];
@tyoshikawa1106
tyoshikawa1106 / 01_BookTrigger.trigger
Last active Jan 14, 2019
@futureをつかったApexトリガーのサンプル
View 01_BookTrigger.trigger
trigger BookTrigger on Book__c (after insert, after update) {
BookTriggerHandler handler = new BookTriggerHandler();
if (Trigger.isBefore) {
// before trigger logic
} else if (Trigger.isAfter) {
if (Trigger.isInsert) {
// GoogleBooksAPIで書籍の情報を取得
handler.setGoogleBooksInfo(Trigger.new);
View TableChart.page
<apex:page showHeader="true" sidebar="false">
<head>
<style>
.cssHeaderRow {
background-color: #2A94D6;
}
.cssTableRow {
background-color: #F0F1F2;
}
.cssOddTableRow {
@tyoshikawa1106
tyoshikawa1106 / handler-sample.txt
Last active Nov 7, 2018
Lightning aura:handler
View handler-sample.txt
aura:waiting
<aura:handler event="aura:waiting" action="{!c.showSpinner}"/>
aura:valueInit
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
aura:valueDestroy
<aura:handler name="destroy" value="{!this}" action="{!c.handleDestroy}"/>
aura:valueChange
@tyoshikawa1106
tyoshikawa1106 / LightningChatterFeed.app
Created Feb 19, 2015
Lightning Apps "forceChatter:feed" Sample Code
View LightningChatterFeed.app
<aura:application >
<link rel="stylesheet" href="/resource/BootstrapSF1/dist/css/bootstrap.css" />
<link rel="stylesheet" href="/resource/BootstrapSF1/dist/css/docs.min.css" />
<script type="text/javascript" src="/resource/jQuery/dist/jquery.min.js" />
<script type="text/javascript" src="/resource/BootstrapSF1/dist/js/bootstrap.min.js" />
<script type="text/javascript" src="/resource/BootstrapSF1/js/docs.js" />
<!-- Header Component -->
<c:LightningHeaderComponent header="Lightning Components" detail="- Sample Application -" />
<!-- forceChatter:feed -->
<forceChatter:feed type="News" />
@tyoshikawa1106
tyoshikawa1106 / CommonUtil.cls
Created Mar 21, 2018
Apex Get Random Value
View CommonUtil.cls
public with sharing class CommonUtil {
/**
* ランダム値取得
*/
public static Integer getRandomNumber(Integer upperLimit) {
if (upperLimit == null || upperLimit <= 0) {
return 0;
}
View SLDS_SVG.page
<apex:page showHeader="true">
<apex:slds />
<div xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<div class="slds-m-around--Large">
<a class="slds-button slds-button--brand" >
<svg class="slds-button__icon slds-button__icon--left" aria-hidden="true">
<use xlink:href="{!URLFOR($Asset.SLDS, '/assets/icons/utility-sprite/svg/symbols.svg#edit')}"></use>
</svg>編集
</a>
</div>
View CookieController.cls
public class CookieController {
/*
* コンストラクタ
*/
public CookieController() {
Cookie counter = ApexPages.currentPage().getCookies().get('counter');
if (counter == null) {
You can’t perform that action at this time.