When registering for events, we would like to show an Entity form hosted in a Portal Web Page defined in the CRM instead of the Angular defined form, so we will be able to use liquid, webRoles, etc. T
Our goal is to be able to change the behavior from some fields depending on whether the logged in contact has certain web role or not, and we did not find how to do this from Angular, because the Events API does not give us any chance to query for contact data. (We understand that only these entities can be inquired in that API)
We realized that the Profile page is not managed by the angular form but created in CRM and app redirects to it, in the way we are needing for our case, so we tried to replicate something like that in our CRM.
We created a web page in the way Profile is created, just changing the Partial URL to "customregistration".
We have checked that in Partner Portal, when you create a web page, Localized Content related records are automatically created for each language. But this did not happened in Events Portal, being the only difference between the predefined Profile Web Page and our custom one, that ours lacks any Localized Content related record. When created manually, it keeps failing (Page not Found)
Although we created both a Page Template (both as a Redirect type to ~/Pages/myCustomRegistration.aspx and also as a web tempplate type with our web template) and a Web Template (without any custom code yet), as it kept failing, we decided to get the Profile page template, so at least we can avoid the "Page Not Found" error.
But when navigating to that web page, no matter if we use Angular or manually in the browser, we are obtaining a "Page Not Found" error.
Is this kind of customization banned for the Event Portal?
Hi Manuel,
Event website is full frontend, while to use the WebAPI with client credential, we need to build custom backend service to support.
(Like the Payment Gateway is still required to be implemented by ourselves to finalize whole event registration.)
Sorry that I haven't Event Portal thus I couldn't test the tutorial for you, but as far as I know, Event API can't be requested directly in browser,
and it may also applies to the custom API endpoint.
I would suggest you test the custom API locally by sending a request and process response in ts file, then return the result you want to corresponding page.(In other word template, the xxxcomponent.html in sample website project.)
https://docs.microsoft.com/en-us/dynamics365/marketing/developer/portal-hosted#local-development
Regards,
Clofly
Hi there Clofy.
The pkoval.com link is very well explained, althought it works with a field from event entity, which is included in the Event API.
However, we need to work with contact entity, so the user JSON object gave us an additional property other than default:
{"email":null,"firstName":"Anonymous","id":null,"isAnonymous":true,"lastName":"User"}
We have created webPage with the endpoint "customEndpoint" pageTemplate and webTemplate as in the tutorial, and we defined a function like this:
public getCustomPropertyFromContact(userId: string): Observable<boolean> {
return this.http.get<boolean>(
`${environment.apiEndpoint}${UserD365Service.usersEndpoint}/authenticated/customEndpoint/?contactId=`+userId`))};
However, we still are receiving a page not found exception when executing the Http request.
Is it possible to use the WebAPI from the Event Management (portal hosted) Portal with client credentials?
Hi Manuel,
Sorry that I failed to understand your clarification correctly.
Event API is fixed, it can be said that Event Portal is a fully frontend website, which means it is just fetching event data from backend and returning registration data to backend.
Although Event Portal is build with Angular, it doesn’t really mean that we can’t use Liquid Script + FetchXML + Json response to extract whatever data we need from CDS and render this data using our Angular frontend, you can refer to following article to achieve the requirement: (See paragraph 4 > method 2 of the article.)
https://pkoval.com/2019/04/07/extending-dynamics-marketing-event-management-portals/
Nevertheless, please be aware of that it is only supported to retrieve data, if you would like to add record to CRM, try using marketing forms for event registration instead.(We need to enable the feature in Settings > Feature switches.)
https://docs.microsoft.com/en-us/dynamics365/marketing/event-forms
https://crmtipoftheday.com/1344/video-guide-to-improved-event-management-in-dynamics-365-marketing/
Regards,
Clofly
This redirects to "~/Pages/FullPage.aspx" and "~/Pages/Page.aspx" did not worked neither.
And links related to attachements, they assume that we are able to display the entity form in a custom web page, but they do not tell us anything about how to display this page in the angular portal when we are having problems for doing that.
All what we need is being able to query data to CDS that is not exposed in the Event API (and it can not be exposed by creating Website Entity configuration because data belongs to entities not supported there).
So we are thinking again in trying to use webAPI from the Angular portal. Is this allowed? Could you give us any example of implementation of this approach in the event portal? Because all what we have found is related to the usage within Dynamics CRM js web resources for working into CRM forms
Hi Manuel,
In Dynamics 365 for Marketing, there are some dedicated solutions to manage Event Portal:
https://docs.microsoft.com/en-us/dynamics365/marketing/developer/marketing-solutions
Accordingly, some functionalities would be different to other types of portal. (e.g: Changes to header and footer won't reflect to corresponding Angular sections, they have standalone pages.)
However, from experience of some community members, we should be still able to create custom page in Event Portal.
You could set Rewrite Url to "~/Pages/FullPage.aspx" and "~/Pages/Page.aspx" instead to test again, those two values are recommended by documentation.
Overall, it is supported to create our own page in Event Portal, so I would also suggest refreshing your portal. Here are some options to clear portal cache.
https://www.engineeredcode.com/blog/power-apps-portals-changes-to-caching(I usually choose the third way.)
Regards,
Clofly
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156