Schedule SF Data Sync
SF データ同期は、Salesforce 組織から CG Cloud 処理サービスデータベースへの下位同期と上位同期を可能にする、プラットフォーム外のフレームワークコンポーネントです。SF データ同期についての詳細は、「CG Cloud 処理サービスとのデータ同期」を参照してください。
- リソース
-
1SCHEDULE_SFDATA_SYNC - 使用可能なバージョン
- 55.0
- Apex 要求の例
-
1String endpointName = 'SCHEDULE_SFDATA_SYNC'; 2// Below is the list of all allowed SF Objects which can be synced but is not mandatory to sync all objects. 3// We can have only one or two items from the list below 4List<String> synchronizableObjects = new List<String> { 5 'cgcloud__Account_Extension__c', 6 'cgcloud__Account_Product_Profile__c', 7 'cgcloud__Account_Trade_Org_Hierarchy__c', 8 'cgcloud__Custom_Calendar__c', 9 'cgcloud__Custom_Period__c', 10 'cgcloud__Business_Year__c', 11 'cgcloud__KPI_Map__c', 12 'cgcloud__Product_Category_Share__c', 13 'Product2', 14 'cgcloud__Product_Hierarchy__c', 15 'cgcloud__Product_Part__c', 16 'cgcloud__Promotion_Template__c', 17 'cgcloud__Sales_Organization__c', 18 'cgcloud__System_Setting__c', 19 'cgcloud__Week_Day_Share_Profile__c', 20 'cgcloud__Condition_Search_Group__c', 21 'cgcloud__Condition_Search_Rule__c' 22}; 23<namespace>.OffPlatformCallout request = new <namespace>.OffPlatformCallout(endpointName, '9999'); 24Map<String, Object> requestBody = new Map<String, Object>{ 25 'command' => 'SYNC', //Allowed values: SYNC | RE_SYNC => means Delta or Full synchronization 26 'trackedObjectApiNames' => synchronizableObjects // Optional property: If this 'trackedObjectApiNames' property is not not sent, all objects are synced/re-synced 27}; 28<namespace>.OffplatformCalloutResponse response = request.execute( 29 <namespace>.TransactionHandler.getTransactionIdentifier(), 30 null, 31 JSON.serialize(requestBody) 32); 33if (response.status != 200) { 34 // Handle errors 35}