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