Views:

Overview

In this scenario, we require that every User be given the North52 Formula Manager - Standard security role

We shall do this by creating a formula to update the security roles whenever a user is created. 

North52 BPA Solution

The North52 BPA solution works like this:

  • A formula is created that will trigger whenever a new User is created
  • This formula will check to see if this User has been given the North52 Formula Manager - Standard role
  • The formula will assign the role to the User if it does not already have it

Set up Formula

  • Navigate to Settings > N52 Formula
  • Create a new formula, setting the following values in the Formula Guide:
    • Source Entity set to User
    • Set Formula Type to Save - Perform Action
    • Select the Classic Editor
  • Change the Name of the formula to Auto assign North52 security roles to new users
  • Set Event to Create
  • Expand Deployment Settings
  • Set Pipeline Stage to Post-Operation (Asynchronous)
  • Copy and paste the following into the Classic Editor:
    Smartflow(
      SetVar('GuidofRole',FindValue('role', 'name', 'North52 Formula Manager - Standard', 'roleid', '?', true)),
    
      SetVar('NumberofAssociations' ,
        FindCount('systemuserroles',
                  SetFindAnd('roleid','systemuserid' ),
                  SetFindAnd(GetVar('GuidofRole'), [systemuser.systemuserid] ),
                  'systemuserid',
                  '0',
                  'true')),
    
    
      Iftrue( GetVar('NumberofAssociations') <1,
    
        AssociateEntities('systemuser',
                          [systemuser.systemuserid],
                          'role',
                          FindValue('role', 'name', 'North52 Formula Manager - Standard', 'roleid', '?', true),
                          'systemuserroles_association' )))
    
    
  • Click Save

Test

You are now ready to test. To test the formula, create a User. You should see that the Security Role is set automatically as in the image below:

Did you know?

You can easily schedule recurring processes or CRM record updates

Every business has recurring processes and tasks that need to be done on repeatable and scheduled basis. Microsoft Dynamics 365 users are often surprised to learn that it is difficult to achieve using standard functionality. The North52 Scheduler makes it easy to trigger workflows and/or advanced business logic for specific entity records on a scheduled basis. 

Key features include:    

  • Create Recurring Schedules within Dynamics CRM
  • Powerful Record Targeting - easily create queries to target a specific set of records
  • High Performance - can process 100,000+ records on a scheduled basis
  • Execute Workflow/Action or Update Entities
  • Native to Dynamics 365

Learn more about the Scheduler