Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Business Process Flow JavaScript Issue

$
0
0

Hi,

I use javascript to change an option set value, when the business process flow on my entity changes stage (https://community.dynamics.com/crm/f/117/t/210287).

The code works fine. However, I'm now receiving errors about Duplicate Records from the entity:

The log file tells me this:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Cannot insert duplicate key.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220937</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Cannot insert duplicate key.</Message>
<Timestamp>2016-09-08T11:33:30.8539512Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>

[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin]
[bb48066e-f22f-412f-a530-91f72e4b859b: GlobalActiveStagePlugin]


</TraceText>
</OrganizationServiceFault>

Further investigation reveals that the 'processid' field on the entity has been set to NULL. This appears to be the cause of the error.

Has anyone else come across this and found a fix??

Thanks,

Rich


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>