none
工作流中如何获得触发工作流的实体 RRS feed

答案

  • protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
    {
       // Get the context service.
       IContextService contextService = (IContextService)executionContext.GetService(typeof(IContextService));
       IWorkflowContext context = contextService.Context;
       
       context.PrimaryEntityId        //Gets the ID of the primary entity.
       context.PrimaryEntityName   //Gets the name of the primary entity for the workflow.
       context.PrimaryEntityPostImage
       context.PrimaryEntityPreImage
    }
    Batistuta Cai-刀客 | 蔡敏生 | MS CRM MVP | Blog:http://caims.cnblogs.com
    2010年3月8日 4:49
    版主