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.
Hi,
Make sure all required steps are filled in (note that boolean fields are considered as not compiled if set to No) not only from the current stage till the target stage (obviously without the steps of the target stage) but also those of the previous stages.
Please try and confirm if this fixed your problem.
Were you able to resolve the error, i am stuck in the similar situation or may be what solution you applied to move from stage 1 to stage 2 with an auto qualify process on a business process flow.
Thanks,
PS
Hi, i'm facing the same problem. did you manage to fix this?
Hi,
Please check is there anything madatory field in that when to switch to not stage and update . like you are in Qualify stage and now from your code you move to purpose stage means you update the stage but check that Qualify stage have some mandatory field . Sometimes it through error if it is not filled. You can check this from your CRM First
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156