该文被密码保护。 阅读全文
posted @ 2014-01-16 16:58 Bill 李 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-01-16 16:56 Bill 李 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 如果文本框是只读的,值会赋不进去,加上这句话就ok啦Xrm.Page.getAttribute("name").setSubmitMode("always"); 阅读全文
posted @ 2014-01-16 16:42 Bill 李 阅读(181) 评论(0) 推荐(0) 编辑
摘要: //fetch 格式 (enableprefiltering="1" prefilterparametername="CRM_Filteredxd_productionbudget" 过滤条件) //实体之间的连接查询 阅读全文
posted @ 2014-01-16 16:36 Bill 李 阅读(204) 评论(0) 推荐(0) 编辑
摘要: crm 2011 获取当前实体idXrm.Page.data.entity.getId();crm 2011 获取当前实体名称Xrm.Page.data.entity.getEntityName()crm 2011 获取父实体id (前提是新窗口打开): window.parent.opener.X... 阅读全文
posted @ 2014-01-16 16:33 Bill 李 阅读(246) 评论(1) 推荐(0) 编辑
摘要: 日期格式化var myDate = new Date();var myDate1 = new Date();myDate1.setMonth(0);myDate1.setDate(-1);var rq = myDate -myDate1 ;var s1 = Math.ceil(rq/(24*60*60*1000));var s2 = Math.ceil(s1/7);var nowDayOfWeek = myDate.getDay()-1; //今天本周的第几天 (由于是显示周一开始,而不是周日开始)var nowDay = myDate.getDate(); //当前日 var nowMont 阅读全文
posted @ 2014-01-16 16:31 Bill 李 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 选择器过滤(选择客户后联动项目)function AddCustomerView() { var viewId = "{229782D0-1101-48E1-B414-ECB181F97C52}";var entityname="xz_project";var viewDisplayname="项目... 阅读全文
posted @ 2014-01-16 16:24 Bill 李 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 根据选择类型隐藏或显示tab.function association(){ var attribute= Xrm.Page.getAttribute("xd_type"); var value= attribute.getValue(); if(value==0){ hidetab("tab_5"... 阅读全文
posted @ 2014-01-16 16:22 Bill 李 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 选择lookup后自动带出其中的某个字段大小(注意 此字段必须在视图中有显示)//获取size 值function getField(){ var field =Xrm.Page.getAttribute("field");//lookup字段 var fieldSize; if(field==null){ return 0 ; }else{ var fieldValue=field.getValue(); if(fieldValue !=null){ fieldSize = fieldValue[0].keyValues.size.value;//lookup里面的大小字 阅读全文
posted @ 2014-01-16 16:18 Bill 李 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 1 获取文本中的值 2 3 var name=Xrm.Page.getAttribute("xd_name").getValue(); 4 5 获取lookup选择的文本 6 7 var company=Xrm.Page.getAttribute("xd_company").getValue(); 8 9 var name=company[0].name10 11 12 给字段赋值13 Xrm.Page.getAttribute("xd_name").setValue(name);14 15 获取下拉框的文本/值16 var name 阅读全文
posted @ 2014-01-16 16:16 Bill 李 阅读(293) 评论(0) 推荐(0) 编辑
摘要: function s4() {return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); }var guid= s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); 阅读全文
posted @ 2014-01-16 16:14 Bill 李 阅读(213) 评论(0) 推荐(0) 编辑
摘要: var resultHelp = new RESTHelper(); var result = resultHelp .Read(uid); if (result.results.length <= 0) { return; } var id=result.results[0].Id; function RESTHelper() { } RESTHelper.prototype.Read = function (id) { var req = new XMLHttpRequest(); var baseurl = "/" + Xrm.Page.context.getO 阅读全文
posted @ 2014-01-16 16:13 Bill 李 阅读(337) 评论(0) 推荐(0) 编辑
摘要: CheckCode.aspx 是你的验证码页面 阅读全文
posted @ 2014-01-16 16:08 Bill 李 阅读(358) 评论(0) 推荐(0) 编辑
摘要: js验证邮箱 var temp = document.getElementById("email"); //对电子邮件的验证 var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; if (!myreg.test(temp.value)) { $("#intererrmsg").show(); $("#intermsg").html("请输入正确的用户名!" 阅读全文
posted @ 2014-01-16 16:06 Bill 李 阅读(4020) 评论(0) 推荐(0) 编辑
摘要: 禁止粘贴 onpaste="return false" 禁止鼠标右键 oncontextmenu = "return false"只能输入中文、英文、数字、@符号和.符号 onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5\@\.]/g,'')"只能输入数字: onkeyup="value=value.replace(/[^/d]/g,'') "只能输入汉字:onkeyup="value=value.repl 阅读全文
posted @ 2014-01-16 16:03 Bill 李 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 获取当前页面完整地址:var url = window.top.document.URL;获取当前页面名称:var pagename=window.location.pathname 阅读全文
posted @ 2014-01-16 15:59 Bill 李 阅读(1651) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-01-16 15:56 Bill 李 阅读(174) 评论(0) 推荐(0) 编辑
摘要: var arrCookie = document.cookie;var arr = arrCookie.split("=");var kcode = arr[1].toUpperCase(); 阅读全文
posted @ 2014-01-16 15:53 Bill 李 阅读(172) 评论(0) 推荐(0) 编辑