我正在为我的客户端设置一个合适的开发环境(dev/qa/stage/prod).我想找到一种方法来导出报告,以便我们可以干净地从一个环境移动到另一个环境.自定义RDL类型报告很简单(只需在下一个环境中导入RDL),但CRM内部构建的报告似乎不会导出到任何地方.我错过了什么吗?这是否错过了另一个功能?
给予帮助.
如何使用FetchXml进行左连接?
考虑一个简单的SQL查询,如下所示:
select person.name, address.city from person
left join address on person.addressid = address.addressid
Run Code Online (Sandbox Code Playgroud)
如何使用FetchXml完成这样简单的事情?目前我的FetchXml查询如下所示:
<fetch mapping='logical'>
<entity name='person'>
<attribute name='name' />
<link-entity name='address' from='addressid' to='addressid'>
<attribute name='city' />
</link-entity>
</entity>
</fetch>
Run Code Online (Sandbox Code Playgroud) 我试图隐藏/显示CRM 2011功能区中的一个按钮,基于一个条件定义JavaScript.JavaScript函数返回true/false.所以我不想将XML更改Hide/Show为按钮.
我试过这样做,但没有任何运气.谁能建议我正确的方法.
提前致谢
<RibbonDiffXml>
<CustomActions>
<CustomAction Id="Email.Form.email.MainTab.Send.CustomAction" Location="Mscrm.Form.email.Send" Sequence="2">
<CommandUIDefinition>
<Button Id="Mscrm.Form.email.Send" Command="Mscrm.Form.email.Send_Custom" Sequence="1" Alt="$Resources:Ribbon.Form.email.MainTab.Actions.Send" LabelText="$Resources:Ribbon.Form.email.MainTab.Actions.Send" Image16by16="/_imgs/SFA/SendAsEmail_16.png" Image32by32="/_imgs/SFA/SendAsEmail_32.png" TemplateAlias="o1" ToolTipTitle="$Resources:Mscrm_Form_email_MainTab_Actions_Send_ToolTipTitle" ToolTipDescription="$Resources:Mscrm_Form_email_MainTab_Actions_Send_ToolTipDescription" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Mscrm.Form.email.Send_Custom">
<EnableRules/>
<DisplayRules>
<DisplayRule Id="Mscrm.CanWritePrimary" />
<DisplayRule Id="Mscrm.Form.email.InDraftOrFailedState" />
<DisplayRule Id="Mscrm.Form.email.Send.DisplayRule" />
</DisplayRules>
<Actions>
<JavaScriptFunction FunctionName="HideSendEmailButton" Library="$webresource:sandbox_email.js" />
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="Mscrm.Form.email.Send.DisplayRule">
<ValueRule Field="new_type" Value="false" InvertResult="false" />
</DisplayRule>
</DisplayRules>
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml> …Run Code Online (Sandbox Code Playgroud) 我想删除PreSearch文件管理器,我的代码如下.我怎样才能实现同样的目标?
Xrm.Page.getControl("productid").removePreSearch(function () {
Object
});
Xrm.Page.getControl("productid").addPreSearch(function () {
fetchxml2();
});
function fetchxml2() {
var fetchXml1 = "<filter type='and'>"
fetchXml1 += "<condition attribute='productid' operator='in' >";
for (var i = 0; i < Itemid.length; i++) {
fetchXml1 += "<value>" + Itemid[i] + "</value>";
}
fetchXml1 += "</condition>";
fetchXml1 += "</filter>";
Xrm.Page.getControl("productid").addCustomFilter(fetchXml1);
//Xrm.Page.getControl("productid").removePreSearch(fetchXml1);
};
Run Code Online (Sandbox Code Playgroud) crm dynamics-crm dynamics-crm-2011 dynamics-crm-4 dynamics-crm-2013
由于建议的方式在MS CRM中存储插件是通过CRM数据库,我认为现在是时候对我正在使用的方法做一些事情,即将磁盘存储在磁盘上.
但问题是我不知道如何嵌入DLL所需的所有其他各种位:本地化资源文件(保存在另一个文件夹中)和一些引用的DLL来自最新的SDK(必须是手动放在bin\assembly文件夹中).在这一点上,我甚至不完全确定这是可能的.
到目前为止,我已经尝试通过将资源文件上的构建操作更改为"内容"或"资源"来解决本地化问题,并测试了此解决方案(仍保留磁盘上的位置,但没有添加本地化文件夹).这不起作用:当我故意在其中一个插件中生成验证错误时,尽管在CRM中选择了不同的语言,但我得到了默认语言消息(英语).
在尝试添加一些引用的DLL文件(即新的SDK DLL:xrm.portal,xrm.portal.files和xrm.client)时,我遇到了类似的问题.当我试图将插件存储在数据库中时(跳过本地化问题),我得到一个CRM错误,说它无法找到XRM.Client程序集或其中一个依赖项.我知道我可以使用ILMerge将整个事情放在一起,但我有一种直觉,告诉我这不是一个好主意.
关于这个问题的任何提示或建议都会很棒.
我使用FetchXML在CRM 2011中查询数据以在SSRS 2008中构建报告.我的查询有效,但它不会返回链接到null实体的记录.这是我的查询:
<fetch>
<entity name="appointment">
<attribute name="scheduledstart" />
<link-entity name="systemuser" from="systemuserid" to="ownerid">
<attribute name="firstname" alias="ownerFirstName" />
<attribute name="lastname" alias="ownerLastName" />
</link-entity>
<link-entity name="contact" from="contactid" to="new_contactperson">
<attribute name="parentcustomerid" alias="parentaccount" />
<attribute name="new_businessunit" alias="businessunit" />
</link-entity>
<attribute name="new_contactperson" />
<attribute name="subject" />
<attribute name="new_coldernotes" />
<link-entity name="activityparty" from="activityid" to="activityid">
<attribute name="participationtypemask" alias="participationtypemask" />
<filter>
<condition attribute="participationtypemask" operator="eq" value="9" />
</filter>
<link-entity name="systemuser" from="systemuserid" to="partyid">
<attribute name="fullname" />
</link-entity>
</link-entity>
<filter type="and">
<condition attribute="scheduledstart" operator="on-or-after" value="@FromDate" />
<condition attribute="scheduledstart" operator="on-or-before" value="@ToDate" /> …Run Code Online (Sandbox Code Playgroud) 我们是否可以使用任何替代方法在Workflow步骤中使自定义Workflow活动可运行.
我所做的就是使用插件注册工具注册dll,然后重启服务器.然后,我们只能在Workflow上使用自定义工作流活动.
我在重新启动IIS后尝试过,希望这样做,但没有运气.
重启服务器的所有时间都不应该是任何解决方案.有什么替代方法请建议.所有你的建议将不胜感激.
夏令时在3月27日在爱尔兰开始.从那时起,任何已添加到Dynamics的记录都将任何日期字段设置为落后于实际添加时间的一小时.
有趣的是,Web UI正确返回日期,而使用SQL Server和XRM查询则错误地返回它们.
服务器机器上的时间设置是正确的,我已安装汇总16,还有什么我可以尝试?
谢谢,
大卫
假设我有以下代码将用户插入MVC应用程序中的MS Dynamics:
public bool CreateContact(string email)
{
if (crm.contacts.Count(x => x.Email == email) > 0)
return false; //Email already exist in the Crm. Skip
var contact = new contact {Email = email};
crm.AddTocontacts(contact);
crm.SaveChanges();
return true;
}
Run Code Online (Sandbox Code Playgroud)
它非常适合阻止用户使用相同的电子邮件地址注册,直到最近我们遇到Dynamics的主要性能问题.
显然,用户会遇到很大的延迟,并经常三次点击触发此代码的按钮.
问题是,.Count()在不同的Http请求中同时触发.SaveChanges()在第一个Request中完成.因此,我们看到的联系人具有相同的电子邮件地址.
虽然我已经从客户端添加了一个修复程序,但我想看看是否可以在服务器端完成此操作.
什么是使这个线程安全的好策略?
虽然在CRM中添加约束是最好的解决方案,但是我现在无法实现该解决方案,因为在发现此问题之前很久就存在CRM中的重复项.显然,有多个应用程序与CRM对话.
由于锁定和线程的经验很少,我最终做了以下事情:
internal static class ContactLock
{
internal static readonly object Locker = new object();
}
public bool CreateContact(string email)
{
lock(ContactLock.Locker)
{
if (crm.contacts.Any(x => x.Email == email))
return false; //Email already exist in the Crm. …Run Code Online (Sandbox Code Playgroud) 如何编写javascript函数来获取crm 2011中的用户名(不是所有者).
crm dynamics-crm dynamics-crm-2011 dynamics-crm-4 dynamics-crm-online
dynamics-crm ×10
dynamics-crm-4 ×10
c# ×2
crm ×2
fetchxml ×2
asp.net-mvc ×1
javascript ×1
plugins ×1
workflow ×1