• 关于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         }
  • 相关阅读:
    十天冲刺4
    单词统计
    十天冲刺3
    学习进度第十周
    十天冲刺2
    十天冲刺1
    梦断代码阅读笔记03
    学习进度第九周
    [强网杯 2019]Upload
    [2020 新春红包题]1
  • 原文地址:https://www.cnblogs.com/hellohongfu/p/2606956.html
Copyright © 2020-2023  润新知