zoukankan      html  css  js  c++  java
  • 关于CRM2011插件注册更改记录状态的消息

    View Code
     1  public override void CustomerExecute(IServiceProvider serviceProvider)
     2         {
     3 
     4           if(Context.MessageName==MessageName.SetStateDynamicEntity.ToString() && (
     5               Context.PrimaryEntityName==EntityName.new_opportunity.ToString()
     6               || Context.PrimaryEntityName == EntityName.new_retrocession.ToString()
     7               || Context.PrimaryEntityName == EntityName.new_facultativere.ToString()))
     8           {
     9               EntityReference target = (EntityReference)Context.InputParameters["EntityMoniker"];
    10               OptionSetValue state = (OptionSetValue)Context.InputParameters["State"];
    11               OptionSetValue status = (OptionSetValue)Context.InputParameters["Status"];
    12               //int statecode = 1;
    13               //
    14 
    15               if (state.Value == (int)GoalState.Inactive)
    16               {
    17                   if (Context.PrimaryEntityName == EntityName.new_opportunity.ToString())
    18                   {
    19                       UpdateNew_facultativere(target, new_systemuser_new_opportunity_id, "关闭商机");
    20                   }
    21                   if (Context.PrimaryEntityName == EntityName.new_facultativere.ToString())
    22                   {
    23                       UpdateNew_facultativere(target, new_systemuser_new_facultativere_id, "关闭临分单");
    24                   }
    25 
    26                   CloseSubRecord(target, Service, AdminService);
    27               }
    28 
    29             
    30 
    31           }
    32         }
  • 相关阅读:
    css
    js
    css3
    css
    深浅拷贝
    index-数据结构/算法
    es6知识点
    在vscode中配置sass savepath
    计算机基础
    element-ui使用后手记
  • 原文地址:https://www.cnblogs.com/hellohongfu/p/2606956.html
Copyright © 2011-2022 走看看