原创 Salesforce 使用Code直接運行Batch
BatchSendMessage bcrbatch = new BatchSendMessage(); Database.executeBatch(bcrbatch); 或 Database.executeBatch(new BatchS
原创 Salesforce 獲取Salesforce Token
//獲取Salesforce Token public String getSalesforceToken() { String getTokenUrl = 'https://login.salesforc
原创 Salesforce Batch中調用接口
global class ErrorLogBatch implements Database.Batchable<sObject>,Database.AllowsCallouts 在implements後加上Database.Allows
原创 Salesforce VisualForce在頁面中使用REQUIRESCRIPT函數
<script src="/soap/ajax/41.0/connection.js"> </script > <script src="/soap/ajax/41.0/apex.js"> </script > <apex:includ
原创 Salesforce Batch的全局變量可以進行累計彙總
implements Database.StatefulBatch實現Database.Stateful即可 點贊 收藏 分享 文章舉報 小譯丶 發佈了54 篇原創文章 · 獲
原创 Salesforce 代碼鎖定記錄
需要在“流程自動設置“中 選擇在Apex 中啓用記錄鎖定和解鎖複選框global class LockAndUnlock { //訂單鎖定 WebService static void lock(Id OrderId){
原创 Salesforce System.CalloutException錯誤
如果提示這個錯誤設置一下遠程站點System.CalloutException: Unauthorized endpoint, please chec
原创 Salesforce Code做共享
Code共享如果用共享 對象的共享設置必須爲私有list<ImplementProject__Share> ilist = new list<Impl
原创 Salesforce 配置遠程站點Call外部接口
點贊 收藏 分享 文章舉報 小譯丶 發佈了54 篇原創文章 · 獲贊 5 · 訪問量 2萬+ 私信 關注
原创 Salesforce Schedule定時執行方法
例:每十五分鐘執行一次System.schedule('審批歷史15分刷新', '0 15 * * * ?', new ProjectApprovalScheduler()); System.schedule('審批歷史30分刷新', '
原创 Salesforce Rest訂單接口實例
public class OrderInterface { public OrderInterface(Id id) { CallOrderInterface(id); } //發送請
原创 Salesforce 代碼實現提交審批
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest(); req1.setComments('Submitting request for appr
原创 Salesforce 公式字段根據日期計算週數
字段公式 IF( CEILING( ( DATEVALUE( CreatedDate ) - DATE( YEAR( DATEVALUE( CreatedDate ) ), 1, 1) + 1) / 7) > 52, 52, CEI
原创 Salesforce 測試類創建User 並以此用戶運行
創建user,這些是必填的Profile saleProfile = [ select id from Profile where Name = '市場部人員']; List<User> userList = [select id,Pro
原创 Salesforce 查看最近訪問記錄
RecentlyViewed 對象 SELECT Id,Name FROM RecentlyViewed WHERE Type ='Order'