Siebel escript学习笔记
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学习笔记的更多相关文章
- Siebel学习笔记
Siebel(escript)的学习:1.Siebel的数据类型 Primitive(原始的)---Number,Integer,Hexadecimal(十六进制),Octal(八进制),Floati ...
- js学习笔记:webpack基础入门(一)
之前听说过webpack,今天想正式的接触一下,先跟着webpack的官方用户指南走: 在这里有: 如何安装webpack 如何使用webpack 如何使用loader 如何使用webpack的开发者 ...
- PHP-自定义模板-学习笔记
1. 开始 这几天,看了李炎恢老师的<PHP第二季度视频>中的“章节7:创建TPL自定义模板”,做一个学习笔记,通过绘制架构图.UML类图和思维导图,来对加深理解. 2. 整体架构图 ...
- PHP-会员登录与注册例子解析-学习笔记
1.开始 最近开始学习李炎恢老师的<PHP第二季度视频>中的“章节5:使用OOP注册会员”,做一个学习笔记,通过绘制基本页面流程和UML类图,来对加深理解. 2.基本页面流程 3.通过UM ...
- 2014年暑假c#学习笔记目录
2014年暑假c#学习笔记 一.C#编程基础 1. c#编程基础之枚举 2. c#编程基础之函数可变参数 3. c#编程基础之字符串基础 4. c#编程基础之字符串函数 5.c#编程基础之ref.ou ...
- JAVA GUI编程学习笔记目录
2014年暑假JAVA GUI编程学习笔记目录 1.JAVA之GUI编程概述 2.JAVA之GUI编程布局 3.JAVA之GUI编程Frame窗口 4.JAVA之GUI编程事件监听机制 5.JAVA之 ...
- seaJs学习笔记2 – seaJs组建库的使用
原文地址:seaJs学习笔记2 – seaJs组建库的使用 我觉得学习新东西并不是会使用它就够了的,会使用仅仅代表你看懂了,理解了,二不代表你深入了,彻悟了它的精髓. 所以不断的学习将是源源不断. 最 ...
- CSS学习笔记
CSS学习笔记 2016年12月15日整理 CSS基础 Chapter1 在console输入escape("宋体") ENTER 就会出现unicode编码 显示"%u ...
- HTML学习笔记
HTML学习笔记 2016年12月15日整理 Chapter1 URL(scheme://host.domain:port/path/filename) scheme: 定义因特网服务的类型,常见的为 ...
随机推荐
- BZOJ - 1257 分块 详解
中文题面 这道题就是LightOJ某题的升级版 前段时间我是直接用√k前暴力后分块的处理方式,然后直接套个等差求和 这次看到了dalao的证明再次让我知道我好菜啊 在这里做下笔记,学习一下对于整除运算 ...
- 2.rabbitmq 系列教程
rabbitmq系列教程-文章[转] 视频分享: 链接:https://pan.baidu.com/s/1s_Qr2A1o0s8Ru0exK62jqg 提取码:eb68
- pg定时任务创建、查询与删除
select dbms_job.submit('clean_lcs_staff_cm_relation_job', 'select clean_lcs_staff_cm_relation();','0 ...
- zabbix 监控 tomcat
一, 脚本监控文件 #!/bin/bash # @Function # Find out the highest cpu consumed threads of java, and print the ...
- PLSQL Developer 客户端工具的安装
安装之前先把客户端工具instantclient_12_1拷贝到一个没有中文和空格的目录中去, 比如我直接放到了D:\tools下面.注意这里需要的是32bit的. 下面开始安装PLSQL Devel ...
- 简单的 shell 脚本 切分日志
为避免日志过大,需要按天分割日志,定时计划任务脚本如下: /data/shell/backup_yesterday_nginx_log.sh declare logs_path="/data ...
- [Scala] Currying
Currying是一種函數式編程技巧, 指的是把接受多個參數的函數變換成接受一個單一參數的函數. 以一個簡單的例子在Scala中實現.. def f(a:Int, b:Int)={ a+b } //f ...
- 如何运营亿级QPS的Redis系统
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 作者:冯伟源,高级工程师,腾讯云Redis系统运维负责人.6年DBA经验,一直从事SQL优化.实例调优.数据库架构.海量数据库集群运维.运营 ...
- FZU 2213——Common Tangents——————【两个圆的切线个数】
Problem 2213 Common Tangents Accept: 7 Submit: 8Time Limit: 1000 mSec Memory Limit : 32768 KB ...
- ACdream 1098——圆有点挤——————【数学计算】
圆有点挤 Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Pr ...