Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

AG Utilities Distribute One to Many

(0) ShareShare
ReportReport
Posted on by

I am attempting to update all child records in an 1:N relationship using AG Utilities Distribute One to Many plug in.

It is run from a workflow on the parent entity when the Status Reason field changes.  It calls a CHILD workflow on the child entity.  However, I'm getting this error:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Workflow must be marked as on-demand or child workflow.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
at Gemina.CRM2015.WF.CrmDistributeWF.DistributeWFActivity.Distribute(CodeActivityContext executionContext)
at Gemina.CRM2015.WF.CrmDistributeWF.DistributeWFActivity.ExecuteBody(CodeActivityContext executionContext)
at Gemina.CRM2015.WF.CodeActivityBase.Execute(CodeActivityContext context)Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Workflow must be marked as on-demand or child workflow.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc&amp; rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]&amp; outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
at Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
at Gemina.CRM2015.WF.CrmDistributeWF.DistributeWFActivity.Distribute(CodeActivityContext executionContext)
at Gemina.CRM2015.WF.CrmDistributeWF.DistributeWFActivity.ExecuteBody(CodeActivityContext executionContext)
at Gemina.CRM2015.WF.CodeActivityBase.Execute(CodeActivityContext context)</Message>
<Timestamp>2016-07-01T21:13:31.3396544Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>

[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
[fd28b3ae-cf3f-e611-8104-1458d04e6bf0: ]
Starting sync workflow 'POSO - Status - Pre-Finance sets Finance', Id: f728b3ae-cf3f-e611-8104-1458d04e6bf0
Entering ConditionStep1_step:
Entering ConditionStep17_step:
Entering UpdateStep3_step:
Entering CustomActivityStep11_step: Set all POSO line items to Submitted for Approval
Sync workflow 'POSO - Status - Pre-Finance sets Finance' terminated with error 'Workflow must be marked as on-demand or child workflow.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc&amp; rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]&amp; outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
at Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest)
at Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request)
at Gemina.CRM2015.WF.CrmDistributeWF.DistributeWFActivity.Distribute(CodeActivityContext executionContext)
at Gemina.CRM2015.WF.CrmDistributeWF.DistributeWFActivity.ExecuteBody(CodeActivityContext executionContext)
at Gemina.CRM2015.WF.CodeActivityBase.Execute(CodeActivityContext context)'

</TraceText>
</OrganizationServiceFault>

*This post is locked for comments

  • Suggested answer
    razdynamics Profile Picture
    razdynamics 17,304 User Group Leader on at
    RE: AG Utilities Distribute One to Many

    Hi Debra

    Can you share a Screenshot of your WF so we can identify your issue

    Best Wishes, Raz

  • Cyclefitness Profile Picture
    Cyclefitness on at
    RE: AG Utilities Distribute One to Many

    The only other problem is that I have another workflow which watches for that Status Reason to change, but it's not firing.  Is there something about the Distribute One to Many updates that cause their results not to be recognized by the monitoring of a field change?

  • Cyclefitness Profile Picture
    Cyclefitness on at
    RE: AG Utilities Distribute One to Many

    I just reselected the on demand workflow and it seems to be working now.  Not sure what I had done wrong, but all child records are now being updated!

  • Cyclefitness Profile Picture
    Cyclefitness on at
    RE: AG Utilities Distribute One to Many

    Child.  I tried changing to on demand and get the same error.

    It's being called from the parent entity via a workflow that is triggered when the Status Reason field changes.  It calls and on demand workflow on the child entity to update all the related children's records Status Reasons to match.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans