5

Using Realtime Marketing Form In Events Power Pages Website

 1 year ago
source link: https://meganvwalker.com/using-realtime-form-in-events-power-pages-website/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Using Realtime Marketing Form In Events Power Pages Website

2023-07-28

Marketing Events Portal Series This is part of a series on creating and customising a Marketing Events Portal using a Power Pages website. The posts are based on my own learnings and understanding of what is possible with the Event Management functionality. Each post will cover a different area of D365 Marketing as it relates to events.

*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***

This series is looking at building your own custom Events Portal using a Power Pages website. How do you get the actual event pages set up and add the registration form to each one? In this post we will look at one method, adding the script to each new page of your portal. This is just one method and in my opinion not likely to be the one you end up going with but will be a good starting point to understand how it works. Let’s get started!

First, make sure you have already enabled the ability to use Real-time Event Registration Forms by going in to the feature switches, Event management and then enabling the switch.

enable-event-creation-in-RTM.png
Click to view in detail

Once you’ve done this, you will notice a new option when adding an event to do so in real time marketing.

add-event-in-rtm.png
Click to view in detail

Most of the form will be the same as if you are adding an event previously, but now the website and form tab is a little different. There is a default registration form already there. You can open that and edit it should you wish.

registration-form-options.png
Click to view in detail

Alternatively you can remove the default one from the lookup field and add a new form.

add-new-form.png
Click to view in detail

Pick from one of the templates.

pick-a-template.png
Click to view in detail

You can then edit the form in the same way you would with any other piece of content and publish it once ready to go.

edit-the-form.png
Click to view in detail

You can then copy the javascript for the form. We are going to use this to embed in to a page in the Events Portal. You won’t be able to make the Event live yet until you have the URL for the new event page.

copy-javascript-1024x85.png
Click to view in detail

Now you will need to go to your Power Pages portal and create a new page. There are various ways to do this. Let’s look at doing it on Power Pages in the maker portal (https://make.powerpages.microsoft.com). Select the option to add a new page, then give it a name and pick a standard or custom layout.

pick-your-layout.png
Click to view in detail

Once you’ve added the page, click the option to edit in Visual Studio Code. You will be prompted with a pop up, just click on Open Visual Studio Code and a new tab will open.

edit-in-VS-code.png
Click to view in detail

Paste in the javascript code you got from the event form in the place you wish the form to show up. Close the Visual Studio Code editor, saving when prompted. If you look at the code for the form, you should see data-readable-event-id= then the name of the form followed by some numbers. This readable event id is from the Event record and is used to make sure the page being loaded is linked back to the correct Event when the form is submitted. This means you can use the same form for different events should you choose (more on that in a future post).

visual-studio-code-editor-1024x210.png
Click to view in detail

Then you can sync the changes you just made.

sync-changes.png
Click to view in detail

Take the URL for the new page you just created and go back to the Event in D365 Marketing. Select to add this to your own website, then add the URL to the Registration page URL field. Save and then click the Go live button to publish the Event. Now it’s time to review your page!

add-page-url.png
Click to view in detail

There are a couple of gotchas to keep in mind. First one, if you see the error below of ‘Failed to load form’, make sure the Event is actually live. If still in draft, you will never see the form load.

failed-to-load.png
Click to view in detail

Another error is this one, with a message of ‘No event has been passed to the event registration form’. This is likely happening because you took the Javascript direct from the Event registration form, rather than taking it from the section on the event where your form has been linked.

no-event-passed.png
Click to view in detail

Assuming everything looks good and no errors, that should mean your form has loaded and you will see the details you added. You should be able to fill out the form and submit it. An Event Registration record will be created and linked back to the Event.

event-on-portal-716x1024.png
Click to view in detail

In summary, if you take this approach, I would ask if a Power Pages portal is right for you. You may as well simply continue using the approach of adding a form to a page on your own company website for registrations. Someone would need to create one form per event, then go in to the portal create one new web page per event to store the form. It’s unlikely that the people working in the marketing team would also have the level of access or knowledge to go and add a new page on the portal.

In the next post, we will look at how to create one Event Registration Form, create an Event record web template for the portal and understand how we can make sure the correct Event information displays. Also, we can make sure that even just using one form, when someone submits it they are registered for the correct Event.


Check out the latest post:
Create Dynamic Event Page Using Liquid Web Template For Your Events Portal

D365 Marketing Weekly Have you seen the D365 Marketing Weekly newsletter yet?
A weekly issue covering features, functionality and news on the topic of Marketing, specifically covering Dynamics 365 Marketing and other interesting tools and tips for anyone interested in the subject.
Subscribe Here

This is just 1 of 399 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK