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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to dynamically launch a entity form in CRM Portal

(0) ShareShare
ReportReport
Posted on by 135

Hi

I have a view details web page in CRM portals. This page has a field named pnumber.  pnumber is an option set with four values. When the pnumber has a specific value I want to change the mode of the webpage (entity form) into Edid mode so that users can input change data. Everything is custom. I am open to using liquid or js. Any suggestions are much appreciated. I am able to get the value of pnumber in the liquid template of View Details page. If pnumber == '15670000' i want to put the page in Edit mode. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    R89 Profile Picture
    135 on at
    RE: How to dynamically launch a entity form in CRM Portal

    Nicholas

    It works now. I created a separate page template for this web page. It works like a charm.

    Thks

  • Verified answer
    Nicholas Hayduk Profile Picture
    2,863 on at
    RE: How to dynamically launch a entity form in CRM Portal

    You should be going to the same page/URL regardless of edit or view.  Whatever page you get to after clicking from the Entity List should be configured with a Page Template that uses the custom web template you created.  If use an out-of-the-box Page Template you might be facing the situation where the Entity Form is being included twice, since you're still using the adx_entityform property of the web page.

  • Verified answer
    Shaminderpal Singh Profile Picture
    1,565 on at
    RE: How to dynamically launch a entity form in CRM Portal

    Hi,

    You should remove the entity list reference from your web page and set it explicitly in web template only. The error which says "An entry with same name already exists" is coming because of entity list tagged to web page. Remove it from Parent and localized web pages and try.

    -Shaminder

  • R89 Profile Picture
    135 on at
    RE: How to dynamically launch a entity form in CRM Portal

    This is what I have in my custom template: It gives me an error on the portal form: " An entry with the same key already exists."

    I am coming to this screen from an entity list. Entity list has View Details web page. I see the display 17560000 on screen and the above error is displayed. The URL when the error is displayed contains view-details. I was expecting it to contain edit-details. Am I missing something?

    This is what I have in my custom web template. Please note that this custom template is used on several other places.

    {% if page.adx_entityform %}

      {% if pnumber == '175650000' %}

      {{ pnumber }}

         {% entityform name: "Edit Details" %}

       {% else %}  

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

      {% endif %}

    {% endif %}

  • Verified answer
    Nicholas Hayduk Profile Picture
    2,863 on at
    RE: How to dynamically launch a entity form in CRM Portal

    Hello,

    You can use Liquid to check the value of a field, then display the appropriate Entity Form.  I put together a quick blog post on the subject:

    www.engineeredcode.com/.../dynamics-365-portal-using-liquid-to-create-conditional-entity-forms

    Hope that helps.

    Nick

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans