When a record is created, if a user has Sales Representative role, auto moves the BPF stage from Qualify to Develop, and if it has Sales Manager role, auto moves from Qualify to Propose. If there are none of these roles available for the user, stay on Qualify stage
BPF Opportunity
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Tuhin PaulRank #7 · 71.9K reputationPosted Mar 21, 2023, 1:19 PM EDT
To implement the desired functionality, you would need to create a workflow that triggers on the creation of a record. Within this workflow, you would need to check the user's role(s) to determine which BPF stage the record should be moved to.
Tuhin PaulRank #7 · 71.9K reputationPosted Mar 21, 2023, 1:22 PM EDT
Please keep a note that I am goin to share a sample code which is specific to to Dynamics 365 and may not work in other CRM systems.
// Get the current user's roles var currentUserRoles = Xrm.Utility.getGlobalContext().userSettings.roles; // Check if the user has the Sales Representative role if (currentUserRoles.some(role => role.name === "Sales Representative")) { // Move the BPF stage to Develop Xrm.Page.data.process.moveNext("Develop"); } // Check if the user has the Sales Manager role else if (currentUserRoles.some(role => role.name === "Sales Manager")) { // Move the BPF stage to Propose Xrm.Page.data.process.moveNext("Propose"); } // Otherwise, stay on the Qualify stage else { Xrm.Page.data.process.moveNext("Qualify"); }