住房和城乡建设部网站监理合同,外网网站建设,上海第五届进博会,做教育机器网站一、修改错误昨天登录报错今天开始返回我之前设置的断点开始重新配置#xff0c;Reporing Services配置完成后发现dynamics365还是下载失败之后下载了一上午dynamics365就一直卡在最后的界面进度条不动索性我直接把所有环境都卸载了 连同虚拟机卸载重装终于在下午的时候dynami…一、修改错误昨天登录报错今天开始返回我之前设置的断点开始重新配置Reporing Services配置完成后发现dynamics365还是下载失败之后下载了一上午dynamics365就一直卡在最后的界面进度条不动索性我直接把所有环境都卸载了 连同虚拟机卸载重装终于在下午的时候dynamics365貌似下载成功了SSRS也出现了然后下载SSRS就按照提示下载安装完成二、创建插件项目官方文档教程编写和注册插件 Microsoft Dataverse - Power Apps |微软学习为插件创建 Visual Studio 项目打开Visual Studio并使用.NET Framework 4.6.2打开一个新的类库.NET Framework项目去下载.Net Framwork4.6.2下载网址https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/net462安装成功1、新建一个类库项目.Net Framwork 4.6.22、下载程序包通过Nuget包管理器下载Microsoft.CrmSdk.CoreAssembliesMicrosoft.Crm.Sdk.Proxy.2015Microsoft.Xrm.Sdk.2015Microsoft.XRM.SDK.2015.OnPremise额外补充的两个Nuget包Microsoft.CrmSdk.Deployment(没成功)Microsoft.CrmSdk.Workflow下载程序集3、实现 IPlugin 接口通过编辑类来实现 IPlugin 接口将该方法的内容替换为以下代码Execute// Obtain the tracing service
ITracingService tracingService
(ITracingService)serviceProvider.GetService(typeof(ITracingService));// Obtain the execution context from the service provider.
IPluginExecutionContext context (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));// The InputParameters collection contains all the data passed in the message request.
if (context.InputParameters.Contains(Target) context.InputParameters[Target] is Entity)
{// Obtain the target entity from the input parameters. Entity entity (Entity)context.InputParameters[Target];// Obtain the organization service reference which you will need for // web service calls. IOrganizationServiceFactory serviceFactory (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));IOrganizationService service serviceFactory.CreateOrganizationService(context.UserId);try{// Plug-in business logic goes here. }catch (FaultExceptionOrganizationServiceFault ex){throw new InvalidPluginExecutionException(An error occurred in FollowUpPlugin., ex);}catch (Exception ex){tracingService.Trace(FollowUpPlugin: {0}, ex.ToString());throw;}
}该插件将创建一个任务活动该活动将提醒帐户的创建者在一周后跟进。将以下代码添加到 try 块。替换注释。与以下内容// Plug-in business logic goes here// Create a task activity to follow up with the account customer in 7 days.
Entity followup new Entity(task);followup[subject] Send e-mail to the new customer.;
followup[description] Follow up with the customer. Check if there are any new issues that need resolution.;
followup[scheduledstart] DateTime.Now.AddDays(7);
followup[scheduledend] DateTime.Now.AddDays(7);
followup[category] context.PrimaryEntityName;// Refer to the account in the task activity.
if (context.OutputParameters.Contains(id))
{Guid regardingobjectid new Guid(context.OutputParameters[id].ToString());string regardingobjectidType account;followup[regardingobjectid] new EntityReference(regardingobjectidType, regardingobjectid);
}// Create the task in Microsoft Dynamics CRM.
tracingService.Trace(FollowupPlugin: Creating the task activity.);
service.Create(followup);这里运行发现报错了去下载.Net Framwork4.5.2下载地址下载 .NET Framework 4.5.2 Developer Pack Offline Installer (microsoft.com)然后重复上边的步骤4、对插件进行签名1、在“解决方案资源管理器”中右键单击 BasicPlugin 项目然后在上下文菜单中选择“属性”。2、在项目属性中选择“签名”选项卡然后选中“为程序集签名”复选框。3、在“选择强名称密钥文件”下拉列表中选择新建...。在“创建强名称密钥”对话框中输入密钥文件名并取消选中“使用密码保护我的密钥文件”复选框。5、单击“确定”关闭“创建强名称密钥”对话框。6、在项目属性“生成”选项卡中验证“配置”是否设置为“调试”。7、按 F6 再次生成插件。8、使用 Windows 资源管理器在以下位置找到内置插件。\bin\Debug\BasicPlugin.dll5、注册程序集一、在“注册”下拉列表中选择“新建程序集”。选择第一个二、在“注册新程序集”对话框中选择省略号 ... 按钮并浏览到在上一步中生成的程序集。三、单击注册所选插件。四、您将看到“已注册插件”确认对话框。五、单击“确定”关闭对话框并关闭“注册新程序集**”**对话框。您现在应该看到程序集BasicPlugin 程序集您可以展开该程序集以查看插件BasicPlugin.FollowUpPlugin 插件。三、打开虚拟机双击Demo然后进入一个网页 把网址复制下来去主机登录进不去就等会 反复试试