Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Liquid help - Web templates.

Posted on by 75

Hello all 

I have a requirement as my web page access control is not working that I want to show a access denied page if the user has a particular role.  in other places I have used liquid code and show different entitity forms/lists  depending on the roles of the user.

for example 

{% if user.roles contains 'Institutional Secretaries' %}

       {% include 'entity_list' key:'Registry Entity List Approved' %}
{% else %}
      {% include 'entity_list' key:'Registry Entity List ALL' %}
 {% endif %}

How Can i do this for web page or web form.. 

{% if user.roles contains 'Secretaries' %}                  
    {% include 'web_page' key:'Access Denied' %}
 {% else %}
     {% include 'web_form' key:'Research Registry Application' %}
{% endif %}
SO if a user with the role of Secretaries comes in They get the Access Denied page.  else my webform loads .. 
Thank you for all your help in advance.
  • Verified answer
    oliver.rodrigues Profile Picture
    oliver.rodrigues 4,052 on at
    RE: Liquid help - Web templates.

    A simple way would be creating a Web Page with the Web Form associated, and just reference that Web Page

    to reference a Web Form directly on the Liquid you need the GUID of your Web Form:

       {% webform id: "b6565a16-da57-4398-9079-38a4d2db0465" %}

    but why is your Web Page Access Control Rule not working? that would be the most secure way to achieve what you need

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

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans