Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

Retrieve Data from Entity using the Portal URL path request instead of ID

(0) ShareShare
ReportReport
Posted on by

Hi, I'm new to Dynamics 365 t but kindly advise and I'll try to understand it.

So I've made a custom entity and custom templates using liquid.

I was able to retrieve the data using the id parameter "request.params.id" and access the right entity in a similar format below:

/test-page/?id=XXXXX-XXXXX-XXXXX-XXXX

The page with the custom template has successfully read and display the data correctly based on the requested id.

But I'd like to know how I can be able to make the URL in a format like this:

/test-page/name instead of /test-page/?id=xxxxx....

I'm planning to add a new unique field on that entity like a "partial url" and use that as the key identifier to retrieve the data from entity (where I can add this "name" value: /test-page/name ). 

But I'm not sure how to implement this approach on the web template? Can you please advise? Thank you!

Categories:
  • RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Retrieve Data from Entity using the Portal URL path request instead of ID

    Got it. If you have handful of records and if you are okay to create a web template/ web page for each of the record then you can do so and have the format you need. In this case, you will have to hard code the Guid of the record within the web template i.e. you can't rely on the query string id parameter to fetch the record details.

    If you don't have any further question then I would appreciate if you can close the thread by marking any suggestion which helped you. :)

  • Community Member Profile Picture
    on at
    RE: Retrieve Data from Entity using the Portal URL path request instead of ID
    [quote user="Ravi Kashyap"]

    Hi,

    I don't think you will be able to achieve the same implemetation as KB articles but I believe you can get rid of id and instead pass some other value as paramter somethign like this-

    /en-US/test-entity/?ProductCode=XYZ

    And then you can read this parameter in liquid and retrieve the record.  The query string paramter is required to get the details of the record.

    By the way how are you openeing this page? Is it from some list? Or you want a direct URL? What is your complete requirement?

    PS: Can you put my name in your response while replying so that I get a direct notification of any replies like "Hi Ravi" please :)

    [/quote]

    Hi Ravi,

    Thanks for the advise. I'll do your recommendation.

    The requirement is just more on the URL format. But if this is quite a limitation, then I'll take note of this. 

    We're quite on the proof of concept stage and I'm trying to do 2 comparisons. First is -- I'm testing to open a page from a custom list so no need to create a lot of web pages through the 'Web Pages' entity. Then another one is just create these pages using the 'Web Pages' entity that would give me a nice URL format.

    Of course the advantage of the custom entity list is it would provide a more relevant set of fields that the user may just filled, thus the reason why I'm trying this approach.

    It's still good to know about this limitation, so we can prepare ahead. Thanks a lot for the answer.

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Retrieve Data from Entity using the Portal URL path request instead of ID

    Hi,

    I don't think you will be able to achieve the same implemetation as KB articles but I believe you can get rid of id and instead pass some other value as paramter somethign like this-

    /en-US/test-entity/?ProductCode=XYZ

    And then you can read this parameter in liquid and retrieve the record.  The query string paramter is required to get the details of the record.

    By the way how are you openeing this page? Is it from some list? Or you want a direct URL? What is your complete requirement?

    PS: Can you put my name in your response while replying so that I get a direct notification of any replies like "Hi Ravi" please :)

  • Community Member Profile Picture
    on at
    RE: Retrieve Data from Entity using the Portal URL path request instead of ID
    [quote user="Ravi Kashyap"]

    Hi,

    Can you please share some more information with screenshot on what you are trying to achieve and have already done? Are you trying to pass the name field as the query string parameter? Or you are trying to retirve data within liquid by the name field?

    [/quote]

    Thanks for the reply, and sure. 

    Here's the screenshot of the page:

    pastedimage1562652320532v1.png

    screenshot of the data:

    pastedimage1562652823874v1.png

    As you can see, it's displaying the correct data from the id using the custom entity I made. The "Test Title" and "Test Description" are example data from the entity. 

    But I don't really want to use that kind of URL format./en-US/test-entity//?id=xxxxxx.... 

    I'd like to make it /en-US/test-entity/insert-dynamic-name (example only) dynamically.

    It's quite similar to the knowledge article detail view that it's using the article public number /article/KA-XXXXX in the URL and I'd like to do the same approach and apply it to my custom template.

    Can you advise how this can be made possible?

  • RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Retrieve Data from Entity using the Portal URL path request instead of ID

    Hi,

    Can you please share some more information with screenshot on what you are trying to achieve and have already done? Are you trying to pass the name field as the query string parameter? Or you are trying to retirve data within liquid by the name field?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans