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

Update Entity error - Participating entity record of stage is not valid

$
0
0

Hi all,

i'm having an issue in trying to Update an Entity, in particular, i want to update the active stage of an Opportunity in the BPF and i'm having the error:

'participating entity record of stage is not valid'

Here's the code i'm using:

newActiveStageId = (Guid)pathResp.ProcessStages.Entities[activeStagePosition].Attributes["processstageid"];

// Retrieve the process instance record to update its active stage
ColumnSet cols1 = new ColumnSet();
cols1.AddColumn("activestageid");

Entity retrievedProcessInstance = crmSvc.Retrieve("opportunitysalesprocess", processOpp1Id, cols1);

// Update the active stage to the next stage
retrievedProcessInstance["activestageid"] = new EntityReference("processstage", newActiveStageId);
crmSvc.Update(retrievedProcessInstance);

crmSvc.Update(...); is the line affected by the error.

I've not found any usefull suggestion about this kind of error, so if someone can help it would be great.

Thanks for anyone responding.


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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