25.03.2014, 12:17 | #1 |
Участник
|
Update parent record on Create child record
Добрый день!
Есть две сущности - Агент (родитель) и Операция (дочерняя). При создании дочерней записи агрегировать суммы дочерних записей, и результат записывать в родительскую. Инфо. о плагине: Цитата:
Isolation mode: Sandbox
Message: Create Pipeline Stage: Post-Operation Execution mode: Synchronous Execution Order: 1 Цитата:
Register this plug-in for an account entity, on the Create message, and in asynchronous mode. Alternately, you can register the plug-in on a post-event in the sandbox.
Цитата:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Agents_ins With Id = a763c7e1-f3b3-e311-ae18-00155d02050e Does Not Exist, Stack trace :
Server stack trace: в System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) в System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) в System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) в System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: в Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest) в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg) Exception rethrown at [1]: в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) в Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest) в Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request) в PackageAgentCreate.CountTransactionAmountCreateEvent.TransactionAmountCreateEvent.Execute(IServiceProvider ServiceProvider)Detail: <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"> <ErrorCode>-2147220891</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic"> <KeyValuePairOfstringanyType> <d2p1:key>OperationStatus</d2p1:key> <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value> </KeyValuePairOfstringanyType> </ErrorDetails> <Message>Agents_ins With Id = a763c7e1-f3b3-e311-ae18-00155d02050e Does Not Exist, Stack trace : Server stack trace: в System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) в System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) в System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) в System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: в Microsoft.Crm.Sandbox.SandboxOrganizationService.Execute(String operation, Byte[] serializedRequest) в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg) Exception rethrown at [1]: в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) в Microsoft.Crm.Sandbox.ISandboxOrganizationService.Execute(String operation, Byte[] serializedRequest) в Microsoft.Crm.Sandbox.SandboxOrganizationServiceWrapper.ExecuteInternal(OrganizationRequest request) в PackageAgentCreate.CountTransactionAmountCreateEvent.TransactionAmountCreateEvent.Execute(IServiceProvider ServiceProvider)</Message> <Timestamp>2014-03-25T08:03:03.3706706Z</Timestamp> <InnerFault i:nil="true" /> <TraceText> [PackageAgentCreate.CountTransactionAmountCreateEvent: PackageAgentCreate.CountTransactionAmountCreateEvent.TransactionAmountCreateEvent] [4553f29d-3fb3-e311-83fc-00155d02050e: PostОперацияCreate] </TraceText> </OrganizationServiceFault> Вот сам код: PHP код:
Последний раз редактировалось Ion; 25.03.2014 в 12:20. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|