DEV2 まとめ

mac2024-04-08  37

Limits クラストランザクションの制御 Database.rollback(sp);Visualforce ページの postback 要求の実行順序transientのリストから取得したレコードについてバッチクラスでHTTPコールアウトを作成する方法    global class BatchSync implements Database.Batchable<sObject>, Database.AllowsCallouts { REST Webサービスを公開しており、双方向SSLを確立(SalesforceおよびREST Webサービス) HTTP 要求での証明書の使用 VisualforceからSOAPまたはREST Webサービスへの非同期コールアウト 

      ↓

   Continuation クラス

TestClassにVFページにパラメータを付ける方法&画面遷移のテストレコードまたは他のユーザをフォローしているユーザの登録を表します-chatter。(EntitySubscription)

Apex クラスを Web サービスとして公開

HerokuとSalesforceプラットフォームの統合

動的 SOQL

SOQL OFFSET

キュー可能 Apex 

public class AsyncExecutionExample implements Queueable { public void execute(QueueableContext context) { Account a = new Account(Name='Acme',Phone='(415) 555-1212'); insert a; } System.enqueueJob(new SecondJob()); }

TestClass

@isTest public class AsyncExecutionExampleTest { static testmethod void test1() { // startTest/stopTest block to force async processes // to run in the test. Test.startTest(); System.enqueueJob(new AsyncExecutionExample()); Test.stopTest(); // Validate that the job has run // by verifying that the record was created. // This query returns only the account created in test context by the // Queueable class method. Account acct = [SELECT Name,Phone FROM Account WHERE Name='Acme' LIMIT 1]; System.assertNotEquals(null, acct); System.assertEquals('(415) 555-1212', acct.Phone); } } テストデータ作成用の共通テストユーティリティクラス静的リソーステストデータの読み込み
最新回复(0)