salesforce看pdf文档总结的一些小知识点
2013-07-15 18:01
344 查看
1、debug调用测试类里面的方法:
HelloWorld.sayYou();-- sayYou是类HelloWorld的静态方法
MyController c = new MyController();
c._methodName();--调用
2、基本数据类型及其方法调用
salesforce_apex_language_reference.pdf ( P228)
3、apex_workbook.pdf
collections
1)怎样去创建一个list且打印 出它的大小
List<Integer> myList = new List<Integer>();
System.debug(myList.size());
2)
数组在apex中是和list是同义的---apex提供了类似于使用list的语法,要创建一个list可以用另一个方法
Arrays in Apex are synonymous with lists—Apex provides an array-like syntax for accessing lists. Here is an alternative way
to create exactly the same list:
Integer[] myList = new List<Integer>();
3)创建list并初始化
List<String> myStrings = new List<String> { 'one', 'two' };
4、loop
for
1)
for (Integer i = 1; i <= 10; i++){
System.debug(i);
}
2)
Integer[] myInts = new Integer[]{10,20,30,40,50,60,70,80,90,100};
for (Integer i: myInts) {
System.debug(i);
}
5、how to debug
setup->logs-->debug log
选择要DEBUG的User对象
然后你在你的apex里面,写System.debug(variable),就可以在上面的页面中看到该apex class 中打印 |DEBUG|.....,就可以进行测试了
6、关于calendar里面关于Month 类的相关方法总结
详细参照论坛网址: http://boards.developerforce.com/t5/General-Development/Help-regarding-Test-case/m-p/315365/highlight/true#M58418
1)初始化month 对象
获得当前月
Month month = new Month(Date 类型); Date --可以是本月的第一天,或是特定的某一天
Date d = month.getFirstDate(); // 获得本月的第一天
获取当前系统时间日期
Date d = system.today();
获取当前系统时间月份
Month m = d.month();
获取当前系统时间某天
Day day = d.day();
6、json 序列化对象
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_json.htm
点击这里 json
js 解析json
/article/7053455.html
js 解析json
7、jquery .tmpl
tmpl用法
8、chatter
http://wiki.developerforce.com/page/Chatter_Code_Recipes http://wiki.developerforce.com/page/An_Introduction_to_Salesforce_Chatter
9、导入静态资源
注意:
1)必须是zip包
2)如果你包里面有一个父文件夹,必须在路径上体现
如你解压后文件夹名是jqui
静态资源引用是也要写上,不能只写jqui里面文件夹
<apex:includeScript value="{!URLFOR($Resource.jquidate, 'jqui/ui/jquery.ui.core.js')}"/>
10、date类型转换
1) string 转换为date类型
貌似必须是yyyy-MM-dd的形式,只能用‘-’连接符,不能用‘/’否则用Date da = date.parse(string strdate);就会报错
所以只能写成这样:date.parse(‘2013-08-05’);
不知道是什么原因,暂时写这样写吧
2) datetime类型转换成String 类型:
DateTime dt ;
String str_dateTime = dt.format('yyyy-MM-dd hh:mm:ss');
11、全局变量
vf-guide P487
{!$UserRole.Name} --- 用户角色
{!$Profile.Name} ---- 判断是否是系统管理员(简档)
HelloWorld.sayYou();-- sayYou是类HelloWorld的静态方法
MyController c = new MyController();
c._methodName();--调用
2、基本数据类型及其方法调用
salesforce_apex_language_reference.pdf ( P228)
3、apex_workbook.pdf
collections
1)怎样去创建一个list且打印 出它的大小
List<Integer> myList = new List<Integer>();
System.debug(myList.size());
2)
数组在apex中是和list是同义的---apex提供了类似于使用list的语法,要创建一个list可以用另一个方法
Arrays in Apex are synonymous with lists—Apex provides an array-like syntax for accessing lists. Here is an alternative way
to create exactly the same list:
Integer[] myList = new List<Integer>();
3)创建list并初始化
List<String> myStrings = new List<String> { 'one', 'two' };
4、loop
for
1)
for (Integer i = 1; i <= 10; i++){
System.debug(i);
}
2)
Integer[] myInts = new Integer[]{10,20,30,40,50,60,70,80,90,100};
for (Integer i: myInts) {
System.debug(i);
}
5、how to debug
setup->logs-->debug log
选择要DEBUG的User对象
然后你在你的apex里面,写System.debug(variable),就可以在上面的页面中看到该apex class 中打印 |DEBUG|.....,就可以进行测试了
6、关于calendar里面关于Month 类的相关方法总结
详细参照论坛网址: http://boards.developerforce.com/t5/General-Development/Help-regarding-Test-case/m-p/315365/highlight/true#M58418
1)初始化month 对象
获得当前月
Month month = new Month(Date 类型); Date --可以是本月的第一天,或是特定的某一天
Date d = month.getFirstDate(); // 获得本月的第一天
获取当前系统时间日期
Date d = system.today();
获取当前系统时间月份
Month m = d.month();
获取当前系统时间某天
Day day = d.day();
6、json 序列化对象
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_json.htm
点击这里 json
js 解析json
/article/7053455.html
js 解析json
7、jquery .tmpl
tmpl用法
8、chatter
http://wiki.developerforce.com/page/Chatter_Code_Recipes http://wiki.developerforce.com/page/An_Introduction_to_Salesforce_Chatter
9、导入静态资源
注意:
1)必须是zip包
2)如果你包里面有一个父文件夹,必须在路径上体现
如你解压后文件夹名是jqui
静态资源引用是也要写上,不能只写jqui里面文件夹
<apex:includeScript value="{!URLFOR($Resource.jquidate, 'jqui/ui/jquery.ui.core.js')}"/>
10、date类型转换
1) string 转换为date类型
貌似必须是yyyy-MM-dd的形式,只能用‘-’连接符,不能用‘/’否则用Date da = date.parse(string strdate);就会报错
所以只能写成这样:date.parse(‘2013-08-05’);
不知道是什么原因,暂时写这样写吧
2) datetime类型转换成String 类型:
DateTime dt ;
String str_dateTime = dt.format('yyyy-MM-dd hh:mm:ss');
11、全局变量
vf-guide P487
{!$UserRole.Name} --- 用户角色
{!$Profile.Name} ---- 判断是否是系统管理员(简档)
相关文章推荐
- C#实现office文档转换为PDF或xps的一些方法
- 总结出项目经理必须写的一些文档(指必要的管理文档之外的文档)
- OC中一些容易混淆和忘记的知识点总结
- 根据面试题总结的一些初中级java面试知识点
- C#实现office文档转换为PDF或xps的一些方法
- 近期的安卓学习开发SOS APP的一些总结文档 (拨打电话 加载首页图片的异步代码 判断是否有网络代码)
- 内部类的一些知识点总结
- 转:C#实现office文档转换为PDF或xps的一些方法
- 最近学习安卓中总结的一些知识点 复制代码
- 一些cocos2d-x开发的知识点总结
- Python字符串知识点总结(字符串的一些用法)
- 关于UITableView的一些细碎知识点总结
- Halcon PDF文档(hdevelop_users_guide)学习总结之二——创建新算子
- io知识点总结和一些看法!
- dotnet环境下从PDF文档中抽取Text文本的一些方法汇总
- 【转载,自己做了些批注】重学C++ Primer后一些基本知识点注意点总结
- 总结Android模块化的一些知识点
- 最近学习安卓中总结的一些知识点
- 总结linux学习过程中遇到的细小知识点之Linux帮助文档中各个符号的含义
- C/C++ 一些知识点总结