摘要: --查询数字开始位置PATINDEX('%[0-9]%','3000元/㎡')--查询非数字的开始位置PATINDEX('%[^0-9]%','3000元/㎡') 阅读全文
posted @ 2013-03-07 15:06 流浪De云 阅读(386) 评论(0) 推荐(0) 编辑
摘要: --drop table tb --go --create table tb(code int,su_code int) --insert into tb(code,su_code) values(1,null) --insert into tb(code,su_code) values(11,1) --insert into tb(code,su_code) values(12,1) --insert into tb(code,su_code) values(111,11) --insert into tb(code,su_code) values(112,11) --insert into 阅读全文
posted @ 2013-03-07 15:05 流浪De云 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1.设置控件只读Xrm.Page.ui.controls.get("new_forecasttype").setDisabled(true);Xrm.Page.controls.("new_forecasttype").setDisabled(true);--选项卡是否可见Xrm.Page.ui.tabs.get("tab_3").setVisible(false);--选项卡下的节点是否可见Xrm.Page.ui.tabs.get("tab_5").sections.get("tab_5_section 阅读全文
posted @ 2013-03-07 15:02 流浪De云 阅读(740) 评论(0) 推荐(0) 编辑
摘要: //检查是否打开父窗口或不是if (window.parent.opener.Xrm.Page){ return true;}else { return false;} 阅读全文
posted @ 2013-03-07 15:00 流浪De云 阅读(109) 评论(0) 推荐(0) 编辑
摘要: //隐藏左侧工作流菜单if(window.document.getElementById( 'navAsyncOperations')!=null){ window.document.getElementById( 'navAsyncOperations').style.display = 'none'; }; 阅读全文
posted @ 2013-03-07 14:59 流浪De云 阅读(161) 评论(0) 推荐(0) 编辑
摘要: //子网格刷新父页面parent.opener.parent.document.location.reload(); 阅读全文
posted @ 2013-03-07 14:58 流浪De云 阅读(131) 评论(0) 推荐(0) 编辑
摘要: //crm中的iframe传递参数到aspx页var newTarget = "http://www.cnblogs.com/../ktfw/NewOrOld.aspx";var nsrsbh =crmForm.all.new_nsrsbh.DataValue;newTarget = newTarget +"?nsrsbh="+nsrsbh;crmForm.all.IFRAME_nsrxx.src =newTarget ; 阅读全文
posted @ 2013-03-07 14:58 流浪De云 阅读(207) 评论(0) 推荐(0) 编辑
摘要: //检查是否打开父窗口或不是if (window.parent.opener.Xrm.Page){ return true;}else { return false;} 阅读全文
posted @ 2013-03-07 14:57 流浪De云 阅读(87) 评论(0) 推荐(0) 编辑
摘要: //CRM中URL编码和解码alert(CrmEncodeDecode.CrmNameValueEncode("Good Morning!")); alert(CrmEncodeDecode.CrmNameValueDecode("%3fetc%3d10018"));//js 编码Server.UrlEncode 阅读全文
posted @ 2013-03-07 14:56 流浪De云 阅读(164) 评论(0) 推荐(0) 编辑
摘要: (1).function ChangeDateFormat(val) { var date = new Date(parseInt(val.replace("/Date(", "").replace(")/", ""), 10)); var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; var currentDate = date.getDate() < 10 阅读全文
posted @ 2013-03-07 14:55 流浪De云 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 1,查询时间类型的时候 时间取值要用UTC时间,转成待定格式的字符串例如:$filter=new_date ge datetime'2010-09-10T12:00:00' and new_date le datetime'2010-09-12T12:00:00' and new_type/Value ne 100000000时间转换函数如下 :function GetUTCDate(date) { var year = date.getUTCFullYear(); var month = date.getUTCMonth() + 1; if (month &l 阅读全文
posted @ 2013-03-07 14:54 流浪De云 阅读(187) 评论(0) 推荐(0) 编辑
摘要: CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:Xrm.cs /url:http://crm/Test/XRMServices/2011/Organization.svc /domain:*** /username:*** /password:***** /namespace:Xrm /serviceContextName:XrmServiceContext 阅读全文
posted @ 2013-03-07 14:53 流浪De云 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1.一自定义页面通过ifram签入到客户页面中,取客户页面中的字段new_nameparent.window.document.getElementById("new_name").valueparent.Xrm.Page.getAttribute("字段ID");2.crm中的iframe传递参数到aspx页var newTarget = "http://www.cnblogs.com/../ktfw/NewOrOld.aspx";var nsrsbh =crmForm.all.new_nsrsbh.DataValue;newTar 阅读全文
posted @ 2013-03-07 14:52 流浪De云 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 1.增加按钮,调用JS(),2.JS代码Ceshi =function(gridControl, entityTypeCode) { var id =gridControl.get_selectedIds();} 阅读全文
posted @ 2013-03-07 14:49 流浪De云 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 修改数据库 select MaxRecordsForExportToExcel,* from OrganizationBase修改字段MaxRecordsForExportToExcel的值,默认为10000update OrganizationBase set MaxRecordsForExportToExcel=999999最后重启一下sql 和iis 或者重启服务器 阅读全文
posted @ 2013-03-07 14:48 流浪De云 阅读(166) 评论(0) 推荐(0) 编辑
摘要: relationDateCheck方法 放在Onload之中一.roll 12补丁之后 IE9function relationDateCheck() { var PL = crmForm.all.new_allowrelationdate; var PLV = crmForm.all.new_checkallowrelation; PL.style.display = "none"; PLV.style.display = "none"; // Create a DIV container var addDiv = document.createEle 阅读全文
posted @ 2013-03-07 14:47 流浪De云 阅读(235) 评论(0) 推荐(0) 编辑
摘要: -获取实体的etc码SELECT ObjectTypeCode,Name,EntityId FROM MetadataSchema.Entity where Name='list'--修改选项集的LABEL(修改之后重启IIS)SELECT DISTINCT a.Value , b.Label , b.ObjectIdFROM AttributePicklistValue a JOIN LocalizedLabel b ON a.AttributePicklistValueId = b.ObjectId JOIN Attribute c ON c.optionsetid = a 阅读全文
posted @ 2013-03-07 14:46 流浪De云 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 对于表单环境下,直接使用Xrm.Page.context即可访问上下文环境。如果是在表单外的环境中,例如HTML形式的web资源,那么就需要通过添加ClientGlobalContext.js.aspx文件的方式,完成对GetGlobalContext函数的引用,才可以访问Xrm.Page.context对象,从而访问上面列表中的方法以获取上下文环境。ClientGlobalContext.js.aspx文件的位置是/Webresources文件夹下,所以,在web资源中添加对ClientGlobalContext.js.aspx文件的引用时,需要注意路径问题。举例来说,有一个HTML资源,其 阅读全文
posted @ 2013-03-07 14:45 流浪De云 阅读(359) 评论(0) 推荐(0) 编辑
摘要: //百度查询function baiduselect() { var name = document.getElementById('name').value;//中标单位 if (name != null) { window.open("http://www.baidu.com/baidu?tn=baidu&word=" + name); } else { window.open("http://www.baidu.com/"); }}//在字段后边添加按钮function addButton() { document.getE 阅读全文
posted @ 2013-03-07 14:44 流浪De云 阅读(465) 评论(0) 推荐(1) 编辑
摘要: LOOKUP的赋值和查值在MS CRM平台层,查找类型字段包含三方面的信息:第一,Guid值,即主表的主键值;第二,name值,即主表的主字段的值。所谓主字段信息,就是一条数据记录的摘要描述,例如客户实体的“name”字段——客户名称、系统用户实体的“fullname”字段——系统用户的全名,等等字段,都是主字段信息;第三,实体类型entityType,即当前外键链接的数据表信息,当然了,在Dynamics CRM平台范畴内,应该叫做实体名称;//获取查找类型字段值function () {var price = Xrm.Page.getAttribute("defaultuomsc 阅读全文
posted @ 2013-03-07 14:43 流浪De云 阅读(604) 评论(0) 推荐(0) 编辑