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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Marketing - Event: Exclusive session registration

(1) ShareShare
ReportReport
Posted on by 67

Hello Forum,

we plan to organize our "CEO-Roadshow" for our employees with Dynamics Marketing, Event-management. Our CEO is speaking on several Sites and as the places are limited, sometimes also several times a day on one site to our employees. 

How can we now make sure that the employee can register only to one "session"? Is there a way that the employee sees on the Event-registration-Site how many places are available / booked?

Thanks for any help

Kind Regards

Frieso

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

    Hi Frieso,

    We can achieve your requirement that only allow 1 session registration, just need to add some custom code at front-end.(Event website is built with Angular.)

    1. Disable registration button in side panel.

    file: session-cart.component.html

    path: src\app\components\event\session-cart

    4861.JPG

    In footer container,

    * add a span element, it will only display when there are more than 1 session are added.

    Only 1 session is allowed to registration

    * add a new custom condition: "sessionCartCount() > 1" to the disable attribute of registration button, link the new condition with the existing one by "OR" operator.

    [disabled="sessionCartCount() == 0 || sessionCartCount() > 1"

    Result:

    One sessions is added.

    pastedimage1591956238653v2.png

    Two sessions are added.(the registration button is gray out and disabled)

    pastedimage1591956192604v1.png

    2. Disable registration button on home page.

    file: event.component.ts

    path: src\app\components\event

    5758.JPG

    4024.JPG

    * Initialize a variable to store sessionCount before ngOnInit function 

    public sessionCount = 0;

    * statement 1 will assign session count to the custom variable at beginning, statement 2 will make the variable value could change when we add/remove session to/from cart.(they should be after this.route.queryParamMap... statement)

    > this.sessionCount = this.sessionCartService.getSessionCartForEvent(this.readableEventId).length;

    > this.subscribeToSessionCartCount();

    * The session counting function has been provided by MS, so we just need to import it.(Add the function after ngOnInit function.)

    private subscribeToSessionCartCount() {
        this.sessionCartService.sessionCartChange.subscribe(
            sessionCart => (this.sessionCount = sessionCart.length)
        );
    }

    Then we should edit home page HTML.

    file: event.component.html

    path: src\app\components\event

    2287.JPG

    * We still add a notification text at first.(inside register-container element)

    <span *ngIf="sessionCount > 1" style="color: black;">Only 1 session is allowed to registration</span><br>

    * Add the custom condition to disable the second button on condition.(The second one is for session enabled event.)

    [disabled="sessionCount > 1"

    Result:

    If we add two sessions, the registration button on home page will also be disabled.

    0451.JPG

    In theory, your second requirement that show how many places are booked for employees could be also achieved by code,

    but it's more complex that the first requirement, thus more paragraphs are required to post each step and operation.

    You could try to complete it by yourself with Angular tutorial or developers in your team.

    Regards,

    Clofly

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans