Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Calling EntityForm with querystring in Liquid Template

(0) ShareShare
ReportReport
Posted on by

Hi there,

I'm currently developping a portal and I stumbled on an issue. 

I know how to call a entityform with Liquid with this line of code : {% entityform name:'My_EntityForm' %}

The question is, I have buttons (with Account names on it) on my page generated with a for loop, and when I click on one of these buttons, it returns the id of the selected Account. 

I created an EntityForm for Account which needs a QueryString (id) (sorry about the French version) : 

3386.Image-1.png

My question is, once I have the id after clicking the button, I'd like to "call" the related EntityForm of the selected Account.

Any idea about how to do this, and even if this is possible ? 

Thanks for your kind help,

Arthur

*This post is locked for comments

  • RE: Calling EntityForm with querystring in Liquid Template

    Thank you for your help Phil, it helped :)

  • Verified answer
    PhilKermeen Profile Picture
    PhilKermeen 912 on at
    RE: Calling EntityForm with querystring in Liquid Template

    Sure, you can brew up your own liquid template pages and build up the template from the sites existing web templates. Before you do so i recommend reviewing www.xrmvirtual.com/meeting-details which will give you some pointers on how to put templates together.

    Handy statements include block, extends and include

    eg:

    web template 'two colmn layout'

    <div class="container">

     <div class="page-heading">

       <ul class="breadcrumb">

         {% for crumb in page.breadcrumbs -%}

           <li>

             <a href="{{ crumb.url }}">{{ crumb.title }}</a>

           </li>

         {% endfor -%}

         <li class="active">{{ page.title }}</li>

       </ul>

       <div class="page-header">

         <h1>{{ page.title }}</h1>

       </div>

     </div>

     <div class="row">

       <div class="col-sm-4 col-lg-3">

         {% block sidebar %}{% endblock %}

       </div>

       <div class="col-sm-8 col-lg-9">

         {% block content %}{% endblock %}

       </div>

     </div>

    </div>

    web template 'links on left':

    {% extends 'Two Column Layout' %}

    {% block sidebar %}

     {% assign weblinkset_id = page.adx_navigation.id %}

     {% if weblinkset_id %}

       {% assign nav = weblinks[page.adx_navigation.id] %}

       {% if nav %}

         <div class="list-group">

           {% for link in nav.weblinks %}

             {% if page.url == link.url %}<span style='font-weight:bold'>{% endif %}

               <a class="list-group-item" href="{{ link.url }}">

                 {{ link.name }}

               </a>

                {% if page.url == link.url %}</span>{% endif %}

           {% endfor %}

         </div>

       {% endif %}

     {% endif %}

    {% endblock %}

    {% block content %}

     <div class="page-copy">

       {{ page.adx_copy }}

     </div>

     {% include 'Entity List' %}

    {% endblock %}

  • RE: Calling EntityForm with querystring in Liquid Template

    Hi again,

    I worked on it and found this : community.adxstudio.com/.../crm-entity-tags

    It says that you can load, thanks to Liquid, an entityform "by name or ID". Or, the only attribute available is name, and no way to access my entity form "FormA" with an Id "id00000-00000" for example.

    The best thing I could do is create a page based on a aspx Page template, which loads a new page with my CRM record linked to my account thanks to your URL. It works, but there's still work to do.

    Do you have any idea how I could create a web template that could display an entity form only in a blank page ? This template could be nice in order to display the same content as the Page template, but without the header, footer, Forum section, etc...

    The Page template is based on an aspx page, and I can't have access to it since I'm on an online Portal. I just need the logic of the code to reproduce it for my own purpose (my aim is to display the page in an iFrame under my buttons I talked about earlier).

    Thanks for your help,

    Arthur

  • RE: Calling EntityForm with querystring in Liquid Template

    Hi Phil,

    Thanks for your help. I still have questions about the topic, since what you're telling me is quite new. There isn't a lot of documentation about Liquid and entity forms, and knowing that I'm calling the web page instead of the entity form directly is disturbing.

    I have no web page linked to this entity form. As I said, the only way I found how to display my entity form on my portal page (alongside other things such as entity lists) is by using this : {% entityform name:'My_EntityForm' %}.

    When I use your URL idea, portal throws me an error, and I'm assuming that's because there is no URL to access my entity form.

    The information you gave me leads me in two possible directions :

    1) I wait for your answer and try to find a way to use Liquid in order to display what I'm looking for.

    2) I'll create web pages with those entity forms that won't be displayed on the portal directly, but where buttons can access later on.

    Thanks again for your time,

    Arthur

  • Suggested answer
    PhilKermeen Profile Picture
    PhilKermeen 912 on at
    RE: Calling EntityForm with querystring in Liquid Template

    Hi Arthur,

    Yep, remember you're calling the web page, not the entity form, so the link under your button should be to the web page url that the entity form is displayed on, passing the id as a querystring, along the lines of http://server/webpagename/?id=guidhere

    Hope thats clear, ping back if not,

    Cheers,

    Phil

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans