Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.
DISCLAIMER
All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.
Cireson does not and will not support or maintain these enhancements, extensions, and scripts.
For Team Cireson uploads click here.
Display Customer Information and image from EWS below User Name
Basically it displays information below the Affected User on both Incidents and Service Requests. it can be modified to work with any other user pickers added to a form as well (eg as shown in the image below we have a Primary contact that this also shows below when the prepHelpBlock is called for it as well.
just include in your custom.js, and in the attached file search for "EWSServerName" and update the variable with the address for your ews server (do not include the https:// or anything after the domain name)
it can be modified easily to show other information or remove what it currently shows
Comments
Hey Jeff, many many thanks for sharing that great solution, it works like a charm!
One strange thing is remaining in our environment: to get the EWS photo it asks for credentials like
As soon as the credentials are entered, everything works fine.
Is that a federation problem?
Thanks and best regards
Silas
May be worth talking to your exchange expert on that one
@Jeff_Lang Thank you for sharing! .. just a side note - your email adress is still written in the cc-field.
You may get a few unintentional love letters ;-)
$("label[for='" + userPickerId + "']").parent().on("click", "a", function(e)
{
var mailLink = e.target.href;
var irTitle = (pageForm.viewModel.Title) ? encodeURIComponent(pageForm.viewModel.Title) : "";
var emailSubject = "[" + pageForm.viewModel.Id + "] " + irTitle;
var irDesc = (pageForm.viewModel.Description) ? encodeURIComponent(pageForm.viewModel.Description) : "";
e.currentTarget.href = mailLink + "&cc=DPTI.ServiceManagerDev@sa.gov.au&subject=" + emailSubject;
}
)
worthwhile for anyone using this to also update that, we have that in there so that anything sent this way also gets added to the workitem in scsm
Slightly off topic,
@Jeff_Lang How did you get those lovely red numbers on hour navigation bar?
Hi
regarding the logon window - which version of Exchange your are using ?
(Exchange 2013 / 2016 on premise or MS Cloud Solutions ?)
regards
Roland
@Jeff_Lang: which authentication methods did you select for your EWS?
This is a screenshot of our environment:
Hi,
for a better problem solution - it might be helpful if you press F12 (on IE or EDGE) to go into the developer view. maybe you can see some errors on the "network" window if tracing is enabled.
This can be helpful for further analyses :-)
regards
Roland
This is a great script, although one thing we have noticed is that it only intermittently loads the user data. I suspect this is a timing thing. @Martin_Blomgren fixed a similar issue with a mutation observer for the badges customisation here: https://community.cireson.com/discussion/comment/9753#Comment_9753.
I think this script might need a similar fix in order to reliably load the user data...
We just put it in a folder called Logo inside the customspace. It must be in a location accessible to everyone from a browser. We had to mess around with the spacing to get it quite right. Feel free to try different settings, but this worked best for us and allowed us to still have the text in addition to the picture (though my OCD still thinks it looks off).
@Jeff_Lang I have noticed this no longer formats correctly with the latest versions of the portal. Are there any plans to update it, or should I just remove it altogether?
Just FYI, this customization appears to be broken in version 11.0.4. Anyone else seeing this?
Yes, I have the issue as well, it appears the person icon for the Teams chat button has thrown the page layout off. I did a little poking with it but my JS and CSS weren't strong enough so I disabled the extension altogether.
Hi All. I updated this to be compatible with 11.x.
Thanks Justin, I will give it a try in our Dev environment today!
Also a quick question, if I wanted to remove the "Alternate Contact Method" box from the IR form and replace it with this addon, what would I need to change in the JS file?
@Justin_Workman I noticed this add on seems to clobber the Affected Users Tickets add on, is there a way to get both of them to display? I don't mind if one is above or below the other.
Thanks Justin, appears to have fixed it for us.
I have been trying to find my EWSServerName but can't seem to find it. We are hybrid with Exchange right now and all of our mailboxes are at O365, but all I see as an option:
https://outlook.office365.com
This would seem to require a login to get to the correct information, and I don't know how that would work.
We also run a hybrid config, but I was able to use our Exchange Online Server, without being prompted for a login. Maybe speak to your infrastructure guys, they should give you the right server for that config - I got my server from them ;)
In order to get the Mail Subject and CC address to the mail, when I click on the address I had to change the code inside the UpdateHelpBlock to the following:
if (typeof obj.Email)
{
var irTitle = (pageForm.viewModel.Title) ? encodeURIComponent(pageForm.viewModel.Title) : "";
var emailSubject = "[" + pageForm.viewModel.Id + "] " + irTitle;
var emailTo = obj.Email;
var emailCC = "OURHELPDESKADDRESS";
strEmailLink = "<a href='mailto:" + emailTo + "?cc=" + emailCC + "&subject=" + emailSubject + "'>" + emailTo + "</a>";
$("#" + userPickerId + "_Email").html(strEmailLink);
$("#" + userPickerId + "_IMG").html("<img src='https://" + EWSServerName + "/EWS/Exchange.asmx/s/GetUserPhoto?email=" + emailTo + "&size=HR96x96'>");
}
@Justin_Workman Thank you for the update :) Is there any solution for the Affected User Tickets no longer being shown when the Block is used?