通過代碼更改商務程序的階段時,提示許可權錯誤

來源:互聯網
上載者:User

標籤:color   lis   ready   herf   bind   output   通過   step   serve   

錯誤描述

SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 00000000-0000-0000-0000-000000000000, OwnerId: 37c8e728-b05c-4b30-ac41-8ee39aa51180, OwnerIdType: 8 and CallingUser: d2225d2c-5ae4-e711-80fd-008cfaf9d41d. ObjectTypeCode: 2500, objectBusinessUnitId: 2d99bd27-8cca-e111-8d7d-005056c00008, AccessRights: CreateAccess其中:
  • OwnerId:37c8e728-b05c-4b30-ac41-8ee39aa51180 為SYSTEM使用者
 相關代碼
var processInstanceId= "<process instance id>";  //BusinessProcessFlowInstanceIdvar nextStageId = "<next stage id>";             //下個階段對應的ProcessStageIdvar retrievedProcessInstance = service.Retrieve("opportunitysalesprocess",  processInstanceId, new ColumnSet("activestageid"));retrievedProcessInstance["activestageid"] = new  EntityReference("processstage",nextStageId);service.Update(retrievedProcessInstance);

    

通過Trace工具,跟蹤出來的日誌如下:at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x64at SystemUserProxy.Execute(PipelineExecutionContext context)  ilOffset = 0x21at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  ilOffset = 0x93at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0xDEat PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  ilOffset = 0x35at MessageProcessor.Execute(PipelineExecutionContext context)  ilOffset = 0x221at InternalMessageDispatcher.Execute(PipelineExecutionContext context)  ilOffset = 0xE4at ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext)  ilOffset = 0x0at ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context)  ilOffset = 0x108at ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context)  ilOffset = 0xAat BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context)  ilOffset = 0x80at BusinessProcessObject.Update(IBusinessEntity entity, ExecutionContext context, Boolean updateWithPipeline)  ilOffset = 0x4Fat RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)  ilOffset = 0xFFFFFFFFat RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)  ilOffset = 0x16at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  ilOffset = 0x6Cat MethodBase.Invoke(Object obj, Object[] parameters)  ilOffset = 0x0at LogicalMethodInfo.Invoke(Object target, Object[] values)  ilOffset = 0x64at InternalOperationPlugin.Execute(IServiceProvider serviceProvider)  ilOffset = 0x43at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)  ilOffset = 0x25Dat VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x64at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  ilOffset = 0x93at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0xDEat PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  ilOffset = 0x35at MessageProcessor.Execute(PipelineExecutionContext context)  ilOffset = 0x218at InternalMessageDispatcher.Execute(PipelineExecutionContext context)  ilOffset = 0xE4at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid callerRegardingObjectId, UserType userType, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)  ilOffset = 0x22Dat ExternalMessageDispatcher.Execute(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid callerRegardingObjectId, UserType userType, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId)  ilOffset = 0x0at OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode, Object operation, UserType targetUserType)  ilOffset = 0x24Aat OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, Guid targetCallerRegardingObjectId, UserType targetUserType, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode)  ilOffset = 0x26at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)  ilOffset = 0x4Bat OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)  ilOffset = 0x1Bat OrganizationSdkService.Execute(OrganizationRequest request)  ilOffset = 0x6at   ilOffset = 0xFFFFFFFFat SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)  ilOffset = 0x24Cat DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)  ilOffset = 0xC4at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)  ilOffset = 0x48at MessageRpc.Process(Boolean isOperationContextSet)  ilOffset = 0x65at Wrapper.Resume(Boolean& alreadyResumedNoLock)  ilOffset = 0x1Bat ThreadBehavior.ResumeProcessing(IResumeMessageRpc resume)  ilOffset = 0x8at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x79at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)  ilOffset = 0x9at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()  ilOffset = 0x35at ThreadPoolWorkQueue.Dispatch()  ilOffset = 0xA4>Web Service Plug-in failed in SdkMessageProcessingStepId: {BB48066E-F22F-412F-A530-91F72E4B859B}; EntityName: new_bpf_3e8ebee6a2bc44519c5fb146b085413a; Stage: 35; MessageName: Update; AssemblyName: Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin, Microsoft.Crm.ObjectModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin; Exception: Unhandled Exception: Microsoft.Crm.CrmSecurityException: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 00000000-0000-0000-0000-000000000000, OwnerId: 37c8e728-b05c-4b30-ac41-8ee39aa51180,  OwnerIdType: 8 and CallingUser: d2225d2c-5ae4-e711-80fd-008cfaf9d41d. ObjectTypeCode: 2500, objectBusinessUnitId: 2d99bd27-8cca-e111-8d7d-005056c00008, AccessRights: CreateAccess在 Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckEx2(ExecutionContext context, SecurityPrincipal principal, SecurityPrincipal ownerPrincipal, Guid objectId, Int32 objectTypeCode, Guid objectBusinessUnitId, AccessRights rights)在 Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckEx(ExecutionContext context, SecurityPrincipal ownerPrincipal, Guid objectId, Int32 objectTypeCode, Guid objectBusinessUnitId, AccessRights rights)在 Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckEx(ExecutionContext context, SecurityAttributes attributes, AccessRights rights)在 Microsoft.Crm.BusinessEntities.SecurityExtension.PreCreateHandlerEntityPrivilegeCheck(Object sender, SecurityTraits traits, SecurityAttributes attributes, ExtensionEventArgs e)在 Microsoft.Crm.BusinessEntities.SecurityExtension.PreCreateSecurityCheck(Object sender, ExtensionEventArgs e, BusinessEntity entity)在 Microsoft.Crm.BusinessEntities.SecurityExtension.PreCreateHandler(ExtensionEventArgs e, Object sender)在 Microsoft.Crm.BusinessEntities.BusinessProcessObject.PreCreateEventHandler.Invoke(Object sender, ExtensionEventArgs e)在 Microsoft.Crm.BusinessEntities.BusinessProcessObject.Create(IBusinessEntity entity, ExecutionContext context, Boolean createWithPipeline)在 Microsoft.Crm.Platform.Server.UserEntityUISettingsServiceAdapter.UpsertByEntityTypeCodeAndUser(Int32 typeCode, Guid userId, String recentlyViewedXml, Dictionary`2 entityList)在 Microsoft.Crm.Platform.Server.UserEntityUISettingsServiceAdapter.UpsertUserSettings(List`1 clientEntityList, List`1 clientViewList, ICollection`1 etcList, Guid userId)在 Microsoft.Crm.Platform.Server.UserEntityUISettingsServiceAdapter.Upsert(IRecentlyViewedRecord recentlyViewedRecord, Guid userId)在 Microsoft.Crm.Platform.Server.RecentlyViewedProcessService.PinProcessForTargetEntityRecord(Guid processInstanceId, Guid processId, IEntityReference targetEntity, Guid userId)在 Microsoft.Crm.Platform.Server.SelectionAlgorithmService.PinProcessOnTargetEntity(IBusinessEntity processInstance, IEntityReference targetEntityReference, IExecutionContext context)在 Microsoft.Crm.Platform.Server.SelectionAlgorithmService.RetrieveDefaultProcessInstance(Guid targetEntityId, Int32 targetEntityTypeCode, String targetEntityLogicalName, Boolean moreProcessData, IExecutionContext executionContext)在 Microsoft.Crm.Platform.Server.InjectProcessInstanceAttributesExtension.HandlePostRetrieve(Object sender, ExtensionEventArgs e)在 Microsoft.Crm.BusinessEntities.BusinessProcessObject.PostRetrieveEventHandler.Invoke(Object sender, ExtensionEventArgs e)在 Microsoft.Crm.BusinessEntities.BusinessProcessObject.TryRetrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget, BusinessEntity& businessEntity)在 Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget)在 Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode)在 Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context)在 Microsoft.Crm.Sales.ObjectModel.QOIService.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context)在 Microsoft.Crm.ObjectModel.BusinessProcessFlowServiceInternalHandler`1.NavigateToNextEntity(IBusinessEntity bpfInstanceToUpdate, Guid nextEntityId, String nextEntityLogicalName, Guid newActiveStageId, String newTraversedPath, Guid processId, ExecutionContext context, WorkflowStep workflowStep)在 Microsoft.Crm.ObjectModel.WorkflowPluginHelper.NavigateToNextEntity(Entity customBpfEntity, IExecutionContext executionContext, IPluginExecutionContext pluginExecutionContext)在 Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin.Execute(IServiceProvider serviceProvider)在 Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)在 Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context).  解決方式 
  • 安裝補丁包,升級到8.2.2.112版本即可,CRM2016-Server-KB4046795-CHS-Amd64

 

通過代碼更改商務程序的階段時,提示許可權錯誤

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.