![]() Once our BPF is created properly on our records, we now want to choose which is the targeted stage, by default when you instanciate a new BPF, it will be set to the first stage (which make sense !). NewProcess will allow the CRM to create a new instance of the BPF (if not existing) for the specified record.Target is the EntityReference of the record you want to affect (opportunity, lead or any other record entity with BPF's).This message will create a new instance of the BPF for the user who is used during the Execute of that request. NewProcess = new EntityReference(BPF.LogicalName, BPF.Id) SetProcessRequest setProcReq = new SetProcessRequest Here is a sample of the code : // Create the instance of the BPF on the record In order to instanciate a new business process flow, we will need to use the SetProcessRequest message from the SDK. Update the BPF row linked to the wanted record to specify the active stage and the traversedpath.SetProcessRequest which will allow you to instanciate the BPF for any users.Until user access the specific record, the BPF will not show up on the database.Īs we want to "force" the operation to be done programmatically here, we will focus on the two main parts of the process: At this point, in the BPF instances, we will have only 10 rows out of the 150. I just created my latest opportunity and out of my 150 users, only 10 accessed the record. Technical sideĪs said above, each user have an instance specific of the BPF for each records. Let's do some maths : 100 users for 400 records = 40 000 BPF instances to manage. The interesting functional part here is that a BPF instance is created for each record and user. Sounds easy, but since the version 8.2 (it's been a while now but it can't hurt to remind the current process), the way BPF are handled with records and users was modified heavily. Migrate records to a different BPF and selected stage.Migrate records to the same BPF but different stage. ![]() That said, I've the pleasure to introduce you our latest XrmToolBox plugin : BPF Managerįor now there are 2 major possibilities : I didn't wait long before I initiated the Visual Studio project on my laptop and started to investigate the possibilities ! :-) Today, I'd like to focus on the Business Process flow part of the Dynamics 365 CRM.Ī little bit of context here, 2 weeks ago, I had the huge chance to attend the Global MVP Summit in Seattle/Redmond, and during some exchanges with other CRM MVPs, I heard a great idea coming from Gus Gonzalez : "What if we could create a tool to migrate records to the same BPF but different stage or to another BPF and selected stage ?". : Microsoft Dynamics CRM has experienced an error.Home Subscribe Business Process Flow migration 25 April 2019 on dynamics 365, MIGRATION, business process flow Reference number for administrators or support: #7AA39F47Detail: Unhandled Exception: `1]: : Microsoft Dynamics CRM has experienced an error. This then allows the Dynamics UI to correctly interpret the record behind the Business Process Flow and so fixes the error on Activating or Deactivating.Īll credit to the following article for providing the resolution to this error post-upgrade of Dynamics: Error Log (this can also be done using the GUID for WorkflowId, but other the real-world name here is easier to work with) This corrects the problem as the WorkflowBase records should have a ‘BusinessProcessType’ of 0 instead of NULL – where the is the Text Name of the Business Process Flow we need to fix. (Name = ‘Opportunity Sales Process’ OR Name = ‘Phone to Case Process’) AND NOTE: As with any Direct-to-SQL modification with Dynamics, this is best avoided if possible and should only be done following a full SQL Backup so we have a rollback point if anything goes wrong – but otherwise will fix this problem. This is where the upgrade has left invalid records in the WorkflowBase Table that we can correct via a SQL Update. After upgrading CRM 2011, 2013 or 2015 to Dynamics 365, we can see a problem where the Default Business Process Flows that come with Dynamics 365 fail to Deactivate or Activate from the Processes area in CRM – instead reporting a stock error which is not much use in tracing to the root cause of the problem.
0 Comments
Leave a Reply. |