CRM字段类型:
货币:new Money(Decimal){SQL更新Money类型字段,需要同时更新_base字段,存在汇率差的时候值不同}
查找:new EntityReference(objecttypename,Guid)
下拉:new OptionSet(Int)
选项集:false/true
时间:DateTime
整数:Integer
十进制数:Decimal
浮点数:Double
单行/多行文本:String
CRM系统:
存储列表值:StringMap
存储附件:annotation
CRM,8个基本数据操作:
Associate 创建多对多关系
Create 创建数据
Delete 删除数据
Disassociate 删除多对多关系
Execute 执行请求
Retrieve 查询一个记录
RetrieveMultiple 查询多个记录
Update 更新数据
1.Xrm.Page.context
用户ID:getUserId()
用户角色:getUserRoles()
用户语言:getUserLcid()
组织名称:getOrgUniqueName()
组织语言:getOrgLcid()
路径参数:getQueryStringParameters()
服务器路径:getServerUrl()/getClientUrl()
前追加组织名称:prependOrgName("/WebResource/**")效果:crmtest/WebResource/**
当前主题:getCurrentTheme()
OutLook:isOutlookClient()/isOutlookOnline()
2.Xrm.Page.data.entity
所有页面元素:attributes【forEach(),get(),getLength()】
单个元素:attributes.get("")【同Xrm.Page.getAttribute()】
实体名称:getEntityName()
实体ID:getId()
是否修改:getIsDirty()
保存事件:save()
添加保存时事件:addOnSave()
移出保存时事件:removeOnSave()
3.Xrm.Page.getAttribute("")
取值:getValue()
赋值:setValue()
是否改动:getIsDirty()
表单载入时的值:getInitialValue()[Boolean, optionset]
提交类型:getSubmitMode(),setSubmitMode()//always,never,ditry
必填等级:getRequiredLevel(),setRequiredLevel()//required、none
用户操作等级:getUserPrivilege()//canCreate()、canRead()、canUpdate()
事件:addOnChange(),removeOnChange(),fireOnChange()[强制执行]
其他:getAttributeType(),getFormat(),getMax(),getMaxLength(),getMin(),getName(),getParent(),getPrecision()
optionset:getOption(),getOptions(),getSelectedOption(),getText()
4.Xrm.Page.getControl("")
属性:getAttribute()【同Xrm.Page.getAttribute()】
禁用/启用:setDisabled(true),setDisabled(false),getDisabled()
显示/隐藏:setVisible(true),setVisible(false),getVisible()
描述:setLabel(),getLabel()
聚焦选中:setFocus
刷新:refresh()//仅限SubGrid
其他:addCustomView(),addOption(),removeOption(value),clearOptions(),getControlType(),getData(),setData(),getDefaultView(),setDefaultView(),getName(),getParent(),getSrc(),setSrc(),getInitialUrl(),getObject()
5.Xrm.Page.ui


1179

被折叠的 条评论
为什么被折叠?



