Can't save workflow AX 2012.

Hi All,

I got problem when saving Ax 2012 workflow, I catch these errors:

Message (05:33:30 pm)
Caught ‘Exception::CLRError’.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.ServiceModel.FaultException`1[Microsoft.Dynamics.AX.Framework.Workflow.Model.AxWorkflowServiceReference.AifFault]: Number selection is canceled.

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 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at request)
at serializedWorkflowConfiguration, Boolean _newConfig, Boolean _newVersion, WorkflowConfigurationVersionType _versionType)
at Microsoft.Dynamics.AX.Framework.Workflow.Model.WorkflowModel.Save()
at Microsoft.Dynamics.AX.Framework.Workflow.Model.Design.ModelEditor.SaveAndClose()
— End of inner exception stack trace —
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeImpl.InvokeClrInstanceMethod(ClrBridgeImpl* , ObjectWrapper* objectWrapper, Char* pszMethodName, Int32 argsLength, ObjectWrapper** arguments, Boolean* argsAreByRef, Boolean* isException)
Exception has been thrown by the target of an invocation.
Number selection is canceled.

Do you have any ideal on these one?

Many Thanks,

Kind Regards,



I think you should check the code in cansubmitWorkflow method of the form.

is it returning true value.

check hard coding the value as true and check again.



Hi Muthu,

Thanks for your reply. I found the way to solve this problem at:

Go to,

System administration > Periodic > Services and Application Integration Framework > Exceptions.

to see the exception message & solve.


Kind Regards,


Is this something related to AIF?

Hi Muthu,

It’s caused by the workflow numbersequence of workflow is setup wrong: access the number sequence & the format wrong.

Kind Regards,