Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

I have to create automatic check-ins functionality in an event

Posted on by
In my event marketing module in d365 crm. I want that the users that are registered automatically get QR code so I created the journey in that mail is been send to them but when I send the email the qr code place dosen't load and also help me what to do that when I scan my QR code the check-in could be done of registered users. So for that I have created Jscript web resource
 
PFA code:-
function Code_OnChange(executionContext) {
    var context = executionContext.getFormContext();
    var code = context.getAttribute(/new_codetext/).getValue();
    if(code == // || code == null) {
     return;
    }
    var queryString = /?$select=msevtmgt_name&$top=1&$filter=statecode eq 0 and msevtmgt_name eq '/ + code + /'/;
    Xrm.WebApi.retrieveMultipleRecords(/msevtmgt_eventregistration/, queryString).then(
       function success(result) {
            if (result.entities.length == 1) {
                var registration_Name = result.entities[0].msevtmgt_name;
                var registration_Id = result.entities[0].msevtmgt_eventregistrationid;
                var value = new Array();
                value[0] = new Object();
                value[0].id = registration_Id;
                value[0].name = registration_Name;
                value[0].entityType = /msevtmgt_eventregistration/;
                context.getAttribute(/msevtmgt_registrationid/).setValue(value);
                context.getAttribute(/msevtmgt_registrationid/).fireOnChange()
            } 
        }, 
        function (error) {
            alert(/Ooops, something went wrong:/ + error.message);
       }  
    );
 
And image of email
 
//

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans