Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Change record ID used by entityform in Liquid Webtemplate (Dyn365 Portals)

Posted on by Microsoft Employee

In Dynamics CRM I have a “meeting” entity and a “meeting invite” entity linked to the Contact entity.

I have a Portal Web Page setup with an EntityList that shows a listing of all the Meeting Invites based on the current logged in user.

I have configured a portal webpage with a corresponding entity form that when the portal user clicks on a “Meeting Invite” record in the entity list, it will open a page where they can view the meeting invite details.  (webpage has a corresponding EntityForm record set based on Meeting Invite CRM form)

The page to view the invite details is based on the following Liquid WebTemplate:

<div class="container">

                <div class="row">

                                <div class="col-md-12">

                                                {% if page.adx_copy %}

                                                                {% include 'page_copy' %}

                                                {% endif %}

                                                <div class="form">

                                                                {% entityform id:page.adx_entityform.id %}

                                                </div>

                                </div>

                </div>

</div>

The Meeting Invite EntityForm will load no problem.

However, I actually want to configure the portal so that when the end user clicks on their “Meeting Invite” record on the EntityList, it will instead show a page with the “Meeting Info”.

If I swap out the Entityform lookup on the webpage to an Entityform configured to show the “Meeting” record instead, my code will display a “can’t find a record” because it is trying to display the EntityForm using the Meeting Invite GUID (from the request.params.id).  This is expected behaviour.

I know you can’t change the GUID passed from the entity list, it can only send the GUID of the records in the entitylist as a parameter.

Is there a way to override the *record id* that the EntityForm uses in a Liquid web template?

Here is my code so far:

{% assign meetingattendance = entities['new_meetingattendance'][request.params.id] %}

{% assign meetingid = meetingattendance.new_meeting.id %}

{%comment}

                Need to have entityform use "meetingid" and not the id passed to the web page from the entity list...

{%endcomment}

<div class="container">

                <div class="row">

                                <div class="col-md-12">

                                                {% if page.adx_copy %}

                                                                {% include 'page_copy' %}

                                                {% endif %}

                                                <div class="form">

                                                                {% entityform id:page.adx_entityform.id %}

                                                </div>

                                </div>

                </div>

</div>

And ADXSTUDIO/Liquid experts out there that can answer or have a solution?

*This post is locked for comments

  • Suggested answer
    Nick.Doelman Profile Picture
    Nick.Doelman 1,947 Most Valuable Professional on at
    RE: Change record ID used by entityform in Liquid Webtemplate (Dyn365 Portals)

    Check out my blog posting on how I resovled this issue:

    readyxrmblog.wordpress.com/.../dynamics-365-portals-overcoming-entity-list-roadblocks-with-html-and-liquid

  • brycare Profile Picture
    brycare on at
    RE: Change record ID used by entityform in Liquid Webtemplate (Dyn365 Portals)

    I'm having the exact same problem.

    I am on a particular page that I arrive on from an entitylist.

    The entitylist passes down the id of Entity X to this page.

    On the page I want to display an entity form against a record that is NOT the id passed down.

    The only thing I could come up with was to add a script tag to set the url of the window to a different page and pass the id I want down to this page - but this is not really an ideal scenario.

    <script>window.location.href = 'http://myurl/myid=XXX-YYY&#39;;</script>

    Anyone got a liquid-based solution to this issue?

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans