Force.com

シンプルな Visualforce + Apex サンプル

以前作ったものを少し進化した形の Apex + Visualforce サンプルです。ボタンを使った例です。 MySimpleClass public without sharing class MySimpleClass { public String myMessage {get;set;} public MySimpleClass() { myMessage = 'Hello world!'; } p…

Migration Tool のセットアップ

Force.com Migration Tool の入手先などをよく忘れるのでメモします。 入手先 Force.com Migration Tool から、Download Summer ’16 release .zip (version 37.0)、ファイル名は「salesforce_ant_37.0.zip」をダウンロードします。 展開 入手した zip ファイ…

私なりの Force.com 開発者向け SFDC Trailhead 学習順序

私なりに、SFDC (Force.com) Trailhead の効率的な学習順序を考えました。 CRM の概要 https://trailhead.salesforce.com/trail/getting_started_crm_basics Salesforce の強みを知る https://trailhead.salesforce.com/trail/salesforce_advantage システム…

メモ: クラス取得

SFDC Tooling API を使って SFDC から Apex クラスを取得する例。 public static ApexClass getApexClass(final ToolingConnection toolingConnection, final String className) throws ConnectionException { final String soql = "SELECT Id, name, FullNa…

メモ: クラス作成

SFDC Tooling API を使って SFDC に Apex クラスを新規作成する例。 public static String createApexClass(final ToolingConnection toolingConnection, final String classBody, final StringBuffer sbufErrorMsg) throws ConnectionException { final Ape…

メモ: クラス更新

SFDC Tooling API を使って SFDC に Apex クラスを更新する例。 public static boolean updateApexClass(final ToolingConnection toolingConnection, final String classId, final String classBody, final StringBuffer sbufErrorMsg) throws ConnectionEx…

認定試験メモ

SFDC: 開発者向け新資格体系と移行試験 (認定Platformデベロッパー) http://www.salesforce.com/jp/services-training/education-services/cert/dev/ 学習ガイド http://www.sfdcstatic.com/jp/assets/pdf/misc/studyguide_cert_pla_dev1.pdf Salesforce: 受…

メモ: ToolingConnection取得

SFDC Tooling API の利用前提となる ToolingConnection を取得する例。 final Properties props = new Properties(); try (Reader reader = new FileReader("build.properties")) { props.load(reader); } final ConnectorConfig connConfig = new Connector…

シンプル Visualforce サンプル

シンプルな Visualforce + Apex のコーディングを忘れがちなのでこれをメモ。 public without sharing class MySimpleClass { public String myMessage {get;set;} public MySimpleClass() { myMessage = 'Hello world!'; } } <apex:page controller="MySimpleClass"> <h1>Congratulations</h1> <p><apex:outputtext value="{!myMessage}" /></p> </apex:page>

Test で こんにちは世界

@isTest public without sharing class MySimpleTest { static testMethod void testMain001() { System.assert(false, 'テストエラーとして見える、Apex による、こんにちは世界!'); } }

Enterprise API によるSFDC接続

SFDC接続 public static EnterpriseConnection getEnterpriseConnection() throws ConnectionException { final ConnectorConfig connConfig = new ConnectorConfig(); connConfig.setUsername("UserName"); connConfig.setPassword("password"); connConfig…

Force.com Migration Tool Simple Sample

Salesforce の Force.com Migration Tool を使うときの、とてのシンプルなサンプルです。defPackage というディレクトリに 必要な package.xml が配置されていることを前提とします。 <project name="Force.com Migration Tool Simple Sample by Igapyon" basedir="." xmlns:sf="antlib:com.salesforce"> </project>

Data Loader のソースコード

Salesforce Force.com の DataLoader は Java で書かれていますが、これには OSS 版があり、ソースコードを参照することができます。 forcedotcom/dataloader https://github.com/forcedotcom/dataloader このソースコードは伊賀的には必見。熟読します。

Salesforceにおける排他処理

排他のことを調べた範囲では、以下の記事が優秀だと思いました。 Force.comプラットフォームのトランザクション制御 標準画面は、デフォルトで楽観排他が提供されます。それ以外は自前での実装です。この中から気になるところをピックアップ Apexコードの呼…

SOQL および SOSL リファレンス

Salesforce の Apex などで利用するSOQL および SOSL リファレンスのリンクメモ。 Force.com SOQL および SOSL リファレンス