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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Help on event URL

(0) ShareShare
ReportReport
Posted on by 6

Hi all,

I update event Angular code to process url pattern "myeventportal.microsoftcrmportals.com/event/MyEventId". I don't want to use "?id=" in my URL.

I run successfully when I open the event home page and click on an event to jump to event detail page, but it failed when I open the event detail page directly.

I think it isn't loading the Angular page. Do you know how to fix this or have a work-around on this?

EventError.png

Thanks!

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    Hi truc,

    The URL format "?id="  is used to pass parameters, and Angular uses its paramMap interface to get parameters after ? symbol.

    That's by design, I recommed you not change this format. 

    Of course, you can still change format(and you've changed it), the reason for issue you encountered is that paramMap.get in event.component.ts and sessions.component.ts can't get id parameters from URL  

    because you had changed it from "event?id=x" to "event/x".

    The format "event/x" is more likely to represent a web page instead of it's passing a parameter.

    It seems that you had changed routerLink attribute of link element to href attribute, would my guess be right?

    pastedimage1582901657142v1.png

    To make your URL format works, you should do following steps:(My demo is based on static readableId)

    1. Add readableID as a child path to event path in routes.ts.

    pastedimage1582901813938v2.png

    2. Assign readableEventId(x) to readableEventId variable in event.component.ts,

    because sessiontracks, spearkers and passes will all use this value to retrieve data in event.component.ts.

    pastedimage1582901974872v3.png 

    3. Also, assign readableEventId(x) to readableEventId variable in event.component.ts,

    because subscribeToEventChange function will be executed when sessions.component.ts onInit event.

     pastedimage1582902152456v4.png

    4. By doing above steps, then you page could display in customized format.

    pastedimage1582902336631v6.png

    In a word, you should write custom js code to query last pathname in customized URL instead of querying parameters.

    However, the real trouble is that every path names in routes.ts are static, while readableEventId is a dynamic value,

    it would be dificult to get URL pathname in routes.ts, and routes.ts will always regards event/a or event/b as a path instead of a parameter.

    So my final suggestion is that you should keep origin URL format.

    Regards,

    Clofly  

  • Suggested answer
    truc binh Profile Picture
    6 on at

    Hi Clofly,

    Thank you very much for your detail feedback.

    I found a work-around for this.

    I am doing in a different way.

    I include id into the route like this.

    EventRoute.PNG

    In the code, I modified to get the id.

    EventCode.PNG

    But I get the error when I open the link with event id directly.

    The reason is the portal cannot find the page with that name when we open the link directly. I create a child page with the partial url is the eventid, and now I can open the link successfully.

    CRMChildPage.PNG

    From now, with each event, I will create a child page with eventId as Partial URL and the event portal can run successfully if users open the link directly.

    Thanks,

    Binh

  • Suggested answer
    ShravanSuri Profile Picture
    1,255 on at

    Hey - glad to see that you've resolved this issue. Thanks Clofly!

    We've also taken this scenario and shared it with the team. If you have further questions - please don't hesitate to reach out via the forums.

    Thanks,

    Shravan Suri

    PM, D365 Marketing

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 202 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans