Siebel(escript)的学习:
1.Siebel的数据类型
Primitive(原始的)---Number,Integer,Hexadecimal(十六进制),Octal(八进制),Floating Point(浮点),Decimal(十进制),Scientific(系统的),Boolean, String
Composite(复合的)---Object,Array,
Special(特殊的)----Undefined(未定义的), Null,NaN(非数值)

2. typeof 方法
typeof variable or typeof(variable)
返回值为:"undefined","boolean","string","object","number","function",or"buffer"

3. Refresh Record Methods
刷新Applet的记录
var oBs=TheApplication().GetService("FINS Teller UI Navigation").
oBs.InvokeMethod("RefreshCurrentApplet",Inputs,Outputs);
/*如果input的参数中有设置Refresh All为Y,则刷新当前View所在的所有Applet*/

BC有两个Method:
BusComp.invokeMethod("RefreshRecord") 刷新当前记录
BusComp.invokeMehtod("RefreshBusComp") 刷新当前查询记录

4.TheApplication().Trace Method
TheApplication().TraceOn(filename,type,selection)
Filename 为日志文件,绝对路径
Type 包括Allocation和SQL
1.Allocation.Traces allocations and deallocations of Siebel objects. This option is useful if you suspect memory leaks in your code.
2.SQL.Traces SQL statements generated by the Siebel application.
Selection 一般我们都用All就可以了
eg: TheApplication().TraceOn("D:\\siebel_debug\\trace.txt","Allocation","All");

5.配置MVL注意点
配置MVL时需要将use primary join 打勾,不然会导致生成N+1条SQL语句的问题.
MVL.use primary join的作用:
use primary join没有打勾,会把每条关联数据都查询出来.
use primary join 有打勾,只会把主关联数据查询出来.

6.About Get BO\BC
About Get BO
1.TheApplication().ActiveBusObject();
returns the business object for the business component of the active applet
2.this.BusObject();
returns the business object for the business component of the applet.
3.TheApplication().GetBusObject("BO NAME");
instantiates and returns a new instance of the argument specified business object
---------------------------------------------------------------------------------------------
About Get BC
1.TheApplication().ActiveBusComp();
returns the business component associated with the active applet.
2.this.BusComp();
returns the business component of the applet.
Eg: this.BusComp().GetFieldValue(“Id”); //use it to get current record id
3.boXXX.GetBusComp("BC NAME");
instantiates and returns a new instance of the argument specified business component

7.BC Operation
with(oBcName){
ClearToQuery();
SetViewMode(AllView);//ViewMode,一般常用的为 Organization Catelog 等
ActivateField("Status");
SetSearchSpec("Id", sOrdId);// or SetSearchExpr(sSearch);
//特别注意 SetSearchSpec 和 SetSearchExpr 交替使用是会覆盖查询条件的情况,自己测试
ExecuteQuery(ForwardOnly);
}
//DeleteRecord 不需要 NextRecord

8.在 escript 中使用 PickList
在脚本中对具有 PickList 的 Field 赋值时,不要直接使用 SetFieldValue 对 field 直接赋值,需要使用 Pick 方法
错误的赋值方式:
BC.SetFieldValue("fieldname", "value"),
正确的赋值方式:
with(oBcCA){
var oBCPick = GetPicklistBusComp("State");
with (oBCPick)
{
ClearToQuery();
SetSearchSpec("Value", "CA");
ExecuteQuery(ForwardOnly);
I f(FirstRecord())
Pick();
}//end with(oBCPick)
oBCPick = null;
}//end with(oBcCA)

9.eScript 中 Split 方法的使用
循环使用 Split 方法会引起内存泄漏,在使用一次后,请及时 destory 对象。如下所示:
while(bHasRecord)
{
sSpiltText = GetSplitText();
var aSplit = sSplitText.Split(“,”);
//TODO Business
aSplit = null;
}//end while

10.对于导入导出的代码的写法
//打开一个文件选择对话框
var cdl = new ActiveXObject( "MsComDlg.CommonDialog" );
cdl.MaxFileSize = 256 ;
cdl.DialogTitle = "Select Data File" ;
cdl.Filter="Excel Files(*.xls)|*.xls|Batch Files(*.csv)|*.csv|Text Files(*.txt)|*.txt|Other Files(*.*)|*.*";
cdl.ShowOpen();
var sFileName = cdl.FileName;
//得到 Excel 中的数据
var ExcelApp = new ActiveXObject("Excel.Application");
var ExcelBook = ExcelApp.Workbooks.Open(sFileName);
var ExcelSheet = ExcelBook.WorkSheets("Sheet1");
var sTemp = ExcelSheet.Cells(1,1).Value;

Siebel escript学习笔记的更多相关文章

  1. Siebel学习笔记

    Siebel(escript)的学习:1.Siebel的数据类型 Primitive(原始的)---Number,Integer,Hexadecimal(十六进制),Octal(八进制),Floati ...

  2. js学习笔记:webpack基础入门(一)

    之前听说过webpack,今天想正式的接触一下,先跟着webpack的官方用户指南走: 在这里有: 如何安装webpack 如何使用webpack 如何使用loader 如何使用webpack的开发者 ...

  3. PHP-自定义模板-学习笔记

    1.  开始 这几天,看了李炎恢老师的<PHP第二季度视频>中的“章节7:创建TPL自定义模板”,做一个学习笔记,通过绘制架构图.UML类图和思维导图,来对加深理解. 2.  整体架构图 ...

  4. PHP-会员登录与注册例子解析-学习笔记

    1.开始 最近开始学习李炎恢老师的<PHP第二季度视频>中的“章节5:使用OOP注册会员”,做一个学习笔记,通过绘制基本页面流程和UML类图,来对加深理解. 2.基本页面流程 3.通过UM ...

  5. 2014年暑假c#学习笔记目录

    2014年暑假c#学习笔记 一.C#编程基础 1. c#编程基础之枚举 2. c#编程基础之函数可变参数 3. c#编程基础之字符串基础 4. c#编程基础之字符串函数 5.c#编程基础之ref.ou ...

  6. JAVA GUI编程学习笔记目录

    2014年暑假JAVA GUI编程学习笔记目录 1.JAVA之GUI编程概述 2.JAVA之GUI编程布局 3.JAVA之GUI编程Frame窗口 4.JAVA之GUI编程事件监听机制 5.JAVA之 ...

  7. seaJs学习笔记2 – seaJs组建库的使用

    原文地址:seaJs学习笔记2 – seaJs组建库的使用 我觉得学习新东西并不是会使用它就够了的,会使用仅仅代表你看懂了,理解了,二不代表你深入了,彻悟了它的精髓. 所以不断的学习将是源源不断. 最 ...

  8. CSS学习笔记

    CSS学习笔记 2016年12月15日整理 CSS基础 Chapter1 在console输入escape("宋体") ENTER 就会出现unicode编码 显示"%u ...

  9. HTML学习笔记

    HTML学习笔记 2016年12月15日整理 Chapter1 URL(scheme://host.domain:port/path/filename) scheme: 定义因特网服务的类型,常见的为 ...

随机推荐

  1. Spring Eureka的使用入门

    Eureka调度服务: Gradle依赖包: 基础框架依赖配置核心代码: buildscript { repositories { mavenCentral() } dependencies {cla ...

  2. Jenkins 更换国内源

    jenkins插件清华大学镜像地址https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json1更换地址方法1.进入j ...

  3. java 加载properties

    /** * 取得属性值,无值时返回默认值 * @param name String 属性名称 * @param defaultValue String 属性名称 * @return String 属性 ...

  4. PHP请求远程地址设置超时时间

    file_get_contents 请求超时设置 $timeout = array( 'http'=> array( 'timeout'=>5//设置一个超时时间,单位为秒 ) ); $c ...

  5. PHP 位运算符

    位运算符 位运算符是指对二进制位从低位到高位对齐后进行运算. 符号 作用 举例 个人理解 & 按位与 $m & $n 全1为1,否则为0 | 按位或 $m | $n 全0为0,有1为1 ...

  6. 可持久化Treap 赛前摸鱼笔记

    1.基本结构 随机化工具 unsigned int SEED = 19260817; //+1s inline int Rand(){ SEED=SEED*1103515245+12345; retu ...

  7. [转] Spring Integration 系统集成

    [From] http://blog.csdn.net/w_x_z_/article/details/53316618 pring Ingegration 提供了基于Spring的EIP(Enterp ...

  8. 从source安装python3.5和pip

    按顺序来,先装上python3.5,source安装,命令是 ./configure --prefix="你想要的路径" make make install 然后是安装pip,但是 ...

  9. win7和centos7双系统--转

    转自http://blog.chinaunix.net/uid-30867756-id-5758575.html 参考:http://blog.csdn.net/hsg77/article/detai ...

  10. nyoj 568——RMQ with Shifts——————【线段树单点更新、区间求最值】

    RMQ with Shifts 时间限制:1000 ms  |  内存限制:65535 KB 难度:3   描述     In the traditional RMQ (Range Minimum Q ...