This file contains hidden or 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
// ひとつ目のPromise | |
function getPromiseA() { | |
var deferred = $q.defer(); | |
console.log('getPromiseA'); | |
setTimeout( | |
function() { | |
var resolveObj; | |
// 処理の成功を示す promise.then() の successCallback をコール ( 引数オブジェクトを渡せる ) | |
console.log('getPromiseA resolve'); | |
deferred.resolve(resolveObj); |
This file contains hidden or 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 > | |
<script type="text/javascript"> | |
(function(){ | |
beenFocused = true; | |
var maxStringSize = 6000000; //Maximum String size is 6,000,000 characters | |
var maxFileSize = 4350000; //After Base64 Encoding, this is the max file size | |
var chunkSize = 950000; //Maximum Javascript Remoting message size is 1,000,000 characters | |
var app = angular.module('myApp', ['ngMessages']); |
This file contains hidden or 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 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"> |
This file contains hidden or 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
@isTest | |
private class TestLoadDataSampleTest { | |
private static User testAdminUser = new User(Id = UserInfo.getUserId()); | |
/** | |
* Check Account Test Data | |
*/ | |
static testMethod void checkTestLoadAccounts() { | |
This file contains hidden or 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,Field,IsDeleted,AccountId,NewValue,OldValue FROM AccountHistory | |
// カスタムオブジェクト | |
SELECT Id,Field,IsDeleted,NewValue,OldValue FROM My_Work__History |
This file contains hidden or 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
String myJson = '[' + '\"' + account.Id + '\"' + ']'; | |
List<Object> jsonDelYomiIdList = (List<Object>) JSON.deserializeUntyped(myJson); |
This file contains hidden or 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 String createSample() { | |
String result = null; | |
try { | |
// Create a new sObject of type Contact | |
// and fill out its fields. | |
SObject contact = new SObject(); | |
contact.setType("Contact"); | |
contact.setField("FirstName", "Otto"); | |
contact.setField("LastName", "Jespersen"); | |
contact.setField("Salutation", "Professor"); |
This file contains hidden or 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
InputStream specStream = new BufferedInputStream(new FileInputStream("./spec.csv")); | |
try{ | |
// 引数はJobInfoとInputStream | |
connection.createTransformationSpecfromStream(job,specStream); | |
} finally{ | |
specStream.close(); | |
} |
This file contains hidden or 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
package com.tyoshikawa1106; | |
import com.sforce.soap.partner.*; | |
import com.sforce.soap.partner.sobject.*; | |
import com.sforce.ws.*; | |
public class HelloController { | |
public static void main(String[] args) { | |
ConnectorConfig config = new ConnectorConfig(); | |
config.setUsername("<Salesforce Login ID>"); |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | |
<types> | |
<members>*</members> | |
<name>ApexClass</name> | |
</types> | |
<types> | |
<members>*</members> | |
<name>ApexComponent</name> | |
</types> |