2017/4/19 周三 -- webService/Apex类

2017-04-20  本文已影响24人  每日好奇心

var s = sforce.apex.execute("类名","方法名",{参数1:'123456',参数2:'123456',...});

`

    {!REQUIRESCRIPT("/soap/ajax/35.0/connection.js")} 
    {!REQUIRESCRIPT("/soap/ajax/35.0/apex.js")} 

  if({!RoseCustomer__c.IsOk__c} == 1){
    alert('已确认,无需再次确认');
  }else{
    var s = sforce.apex.execute("DoCustomerOk","doOK",            
   {customerId:'{!RoseCustomer__c.Id}'});

       alert(s);
      window.location.reload();
  }

`

  1. with sharing 当前类遵循SF的共享模型按SQL语句执行的结果集只查出有权限的数据。
  1. without sharing 按SQL语句执行

类定义形式
private | public | global
[virtual | abstract | with sharing | without sharing]
class ClassName [implements InterfaceNameList] [extends ClassName] {
// The body of the class
}

Database.executeBatch(new BatchName());

执行Batch操作。

上一篇下一篇

猜你喜欢

热点阅读