Hi All,
I am working on Dynamics365 on-prem. I need some info on how to set the BPF of a record to NULL, through a plugin/workflow
Context:
We have a BPF on the Case record.
When an admin user creates a case (admin has Create access for the BPF), the record is created and the BPF is seen on the record.
When a sales rep creates a case (sales rep only has Read access for the same BPF), the record is created without the BPF.
However, if the sales rep opens up the case record created by the Admin User, then the BPF is seen on the record. (since the sales rep has read access)
Since, we cannot remove the 'Read' access of the Sales Rep due to some other reasons (+ would need to do it manually for a lot of other security roles as well), a workaround would to remove the BPF from the particular case record.
Prior to Dynamics365, we can set the 'processid' & 'stageid' to null to achieve this. However, due to the newer concurrent BPF feature in Dynamics365, i believe, we need to use the SetProcessRequest to 'disassociate' the BPF from the record. However, this too does not seem to be working, as I am still able to see the BPF after the SetProcessRequest executes. (see code below)
Is there something wrong about the approach? or is there a simpler way to remove the BPF from specific records using a plugin / workflow?
SetProcessRequest req = new SetProcessRequest();
req.Target = new EntityReference("incident", case.Id);
req.NewProcess = null;
SetProcessResponse response = (SetProcessResponse)crmService.Execute(req);
Thanks in Advance.
Happy CRM'ing!






