CRM 可以实现plugin之前的值传递.

我们可以使用SharedVariables 把值在plugin之间传递

实现plugins之间的传递非常简单,我们只需要用key value pair来配对传递.

读取的时候用key来获取相应key的value

try
{
/*
* SharedVariabls can share the variabls to different plugins
* SharedVariabls will only work under same pipeline
*
*/ // How to setup SharedVariables value
context.SharedVariables.Add("Key1", "Some Info"); // How to retrieve SharedVariables value
string key = context.SharedVariables["Key1"].ToString(); } catch (FaultException<OrganizationServiceFault> ex)
{
throw new InvalidPluginExecutionException("An error occurred in MyPlug-in.", ex);
} catch (Exception ex)
{
tracingService.Trace("MyPlugin: {0}", ex.ToString());
throw;
}

创建一个dynamics 365 CRM online plugin (八) - 使用Shared Variables 在plugins 之前传递data的更多相关文章

  1. 创建一个dynamics 365 CRM online plugin (九) - Context.Depth

    让我们来看看官方文档是怎么讲的 https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide ...

  2. 创建一个dynamics 365 CRM online plugin (七) - plugin当中的Impersonation角色

    我们之前创建的plugin都是使用default的 run in User's Context. 理解就是使用正在登陆的security context用户信息 那有个问题,如果当前用户的securi ...

  3. 创建一个dynamics 365 CRM online plugin (四) - PreValidation

    开始之前,我们要确认一下 Plugin 的 pipeline. PreValidation -> PreOperation -> Server Side System Main Event ...

  4. 创建一个dynamics 365 CRM online plugin (三) - PostOperation

    上两节我们创建了一个 PreOperation的plugin 今天我们创建一个PostOpeartion的plugin和之前的plugin连接起来 当创建contact之后,我们要添加一个task给新 ...

  5. 创建一个dynamics 365 CRM online plugin (一) - Hello World Plugin

    源代码连接:https://github.com/TheMiao/Dynamics365CRM/blob/master/MyCRM/MyCRM/HelloWorld.cs 首先,我们需要创建一个.NE ...

  6. 创建一个dynamics 365 CRM online plugin (十) - Isolation mode or trust mode

    Isolation Mode 也被称作为Plugin Trust CRM里面有两种plugin trust / isolation mode 1. Full Trust 只在OP系统中可使用,没有限制 ...

  7. 创建一个dynamics 365 CRM online plugin (五) - Images in Plugin

    Snapshots of the primary entity's attributes from database before(pre) and after (post) the core pla ...

  8. 创建一个dynamics 365 CRM online plugin (六) - Delete plugin from CRM

    我们之前都学习到怎么添加,debug还有update plugin. 今天带大家过一下怎么从CRM instance当中删除plugin. 首先让我们打开Settings -> Customiz ...

  9. 创建一个dynamics 365 CRM online plugin (二) - fields检查

    Golden Rules 1. Platform only passes Entity attributes to Plugin that has change of data. 2. If the ...

随机推荐

  1. Delphi做验证码登录窗口

    在五月麦田的帮助下做成了,感觉挺好,验证码输入的时候需要大写: 组件:LabelEdit 3个  Button 2个  image 1个. 代码如下: unit Unit1; interface us ...

  2. Java容器解析系列(7) ArrayDeque 详解

    ArrayDeque,从名字上就可以看出来,其是通过数组实现的双端队列,我们先来看其源码: /** 有自动扩容机制; 不是线程安全的; 不允许添加null; 作为栈使用时比java.util.Stac ...

  3. python "import this"

    The Zen of Python, by Tim Peters Beautiful is better than ugly.Explicit is better than implicit.Simp ...

  4. php:数组与json数据相互转换

    1.数组转json $json=json_encode(数组名) 数组转json字符串 2,json转数组 $arr=json_decode(json字符串,[true]) 不加true第一次转直接转 ...

  5. Oracle误删除数据和表的恢复办法包括truncate

    在工作中我们操作数据库的时候经常会发生一个不该发生的问题:用户意外的删除一个非常重要的表或者是表中的数据而且没有备份,需要尽快的恢复,以下就是解决的办法: 主要是利用Oracle回收站的闪回特性ora ...

  6. 虚机配置vip命令行配置

    测试脚本:import osimport re import urllib from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler ...

  7. JS调用本地设备

    JS 允许通过 navigator.mediaDevices.getUserMedia(options) 直接调用本地的设备,比如麦克风,摄像头等.因为该操作涉及到用户隐私,所以调用的时候会弹框请求权 ...

  8. Ubuntu16.04下ZeroC ICE的安装与使用示例(Qt C++ 和 Java)

    项目需求:在Ubuntu16.04系统下安装并使用ICEgrid 3.7进行c++和Java Springboot开发环境的通信,下面逐一介绍各个步骤的详解: 一:Ice Lib的安装 参考官网地址: ...

  9. 使用vue-cli搭建项目

    在使用vue-cli搭建项目前提: 1.node.js环境 2.npm镜像 开始. 1.cmd打开命令行, npm install -g vue-cli 进行全局安装  (vue-V可以查看其版本) ...

  10. Linux中使用sed命令替换字符串小结

    sed替换的基本语法为: sed 's/原字符串/替换字符串/' 单引号里面,s表示替换,三根斜线中间是替换的样式,特殊字符需要使用反斜线”\”进行转义,但是单引号”‘”是没有办法用反斜线”\”转义的 ...