web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Assign Web Role for th...
Power Pages
Answered

Assign Web Role for the Portal contact

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Experts!

I am trying to create a CRM workflow to automatically assign web role for the Contact records. I have some custom web roles. When a contact is created on the portal, I need to assign the web role to the user based on some conditions. While creating a contact, I need to select the User Role from an option set which has option for Admin, and Agency. When Agency is chosen I need to select a value from a lookup which contains different agencies. When I choose agency as "Agency 1" I need to assign a custom web role called "Agency 1" to that contact record. I tried creating workflow referring to the document below.

https://community.dynamics.com/crm/b/thinkdynamicdodynamic/posts/automatically-assign-webrole-to-the-contacts-in-crm-portals

But it does not seem to be working. Could anyone please help me to achieve this?

Your help is greatly appreciated!

Thank you

Categories:
  • Verified answer
    ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Anonymous , 

     

       The new way of achieving your need is via Power Automate. Here are the steps for your reference. 

     

    Create an instant flow: 

     

    Steps:

     

    Using Common Data Services Current environment  

     

    1. Initialize a variable of your choice and set it type to "Boolean"  Ex: ContractNameFlag

    2.  Then set the newly created variable to relevant entity- 

    3. Create a if condition using the newly created value  check if it is true 

    4. Using List Records in CDS current environment > Pick the "Web Roles" Entity 

    5. Then using "Relate Records" action > pick the contact Entity  > choose the relationship "Web Role - adx_webrole_contact". Map the URL to "ODATA id" 

     

    Here is a snap shot for your reference.  You can customize your logic depends on your description. 

     
     

    RelateRecords.png

     

    I am also adding a blog which is worth reading 

     

    https://www.inogic.com/blog/2020/02/associate-disassociate-two-entities-with-1-n-and-n-n-relationship-using-relate-unrelate-records-in-power-automate/ 

     

    Hope this helps. 

     

    ------------

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 18

#2
11manish Profile Picture

11manish 16 Super User 2026 Season 2

#3
Harshit Chaubisa Profile Picture

Harshit Chaubisa 4

Last 30 days Overall leaderboard