Hi Bojan,
1. Yes, the owner can execute this workflow without any errors.
2. See below (but no different information in that message)
3. I tried now, but surprisingly the same result.
I found a text regarding the workflow security context:
- A background workflow is executed in the security context of “the user who made changes to the record” when :
-- It is configured as an on-demand process
-- And is started by a user using a Run Workflow command
- A background workflow is executed in the security context of “the owner of the workflow” when started based on an event
- For real-time workflows you have the Execute As option to decide whether the workflow should run in the security context of the owner of the workflow or in the context of the user who made changes to the record.
So if i get this right, in my case (sync workflow), the kind of triggering (ondemand, child process etc.) shouldn't matter...!?
--------------- Error message:
Sync workflow failed with error message - Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: User with ID 9fd5b217-1a67-e311-80b9-00155d001001 does not have Update permissions for the tbs_decisionmakersales attribute in the tbs_leasingcontract entity. The tbs_leasingcontractid of the record is ff01686c-b410-e411-80cb-00155d001002Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147158777</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>CallStack</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string"> bei Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
bei Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
bei Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
bei Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
bei Microsoft.Crm.Extensibility.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 transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)
bei Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode)
bei Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)
bei Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Update(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>User with ID 9fd5b217-1a67-e311-80b9-00155d001001 does not have Update permissions for the tbs_decisionmakersales attribute in the tbs_leasingcontract entity. The tbs_leasingcontractid of the record is ff01686c-b410-e411-80cb-00155d001002</Message>
<Timestamp>2014-07-21T12:27:49.439896Z</Timestamp>
<InnerFault>
<ErrorCode>-2147158777</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d3p1:key>CallStack</d3p1:key>
<d3p1:value xmlns:d5p1="www.w3.org/.../XMLSchema" i:type="d5p1:string"> bei Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessAttributeUpdateCheck(BusinessEntity entity, ExecutionContext context)
bei Microsoft.Crm.BusinessEntities.BusinessProcessObject.PreUpdateEventHandler.Invoke(Object sender, ExtensionEventArgs e)
bei Microsoft.Crm.BusinessEntities.BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context)</d3p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>User with ID 9fd5b217-1a67-e311-80b9-00155d001001 does not have Update permissions for the tbs_decisionmakersales attribute in the tbs_leasingcontract entity. The tbs_leasingcontractid of the record is ff01686c-b410-e411-80cb-00155d001002</Message>
<Timestamp>2014-07-21T12:27:49.439896Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
bei System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
bei System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
bei Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.ExecuteWorkflowUsingInvoker(Activity workflow, ICommonWorkflowContext context)
bei Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.StartWorkflow(WorkflowActivationData activationData, ICommonWorkflowContext context)
, error code - -2147158777