Today I was testing out the profile cards feature and analysed how Microsoft implemented it as there is only little information to find on docs.microsoft.com, like this article:
https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/admin/enable-profile-card
While using the profile cards I experienced a behavior that was not really self-explanatory for me and my colleagues. Thanks to Chrome DevTools I was able to have look behind the scences to find more information on how it works.
Key findings
If you use a contact lookup field on an entity form and…
t.prototype._getQueryOptions = function (e) { switch (e) { case "contact": return "?$select=emailaddress1"; case "systemuser": return "?$select=internalemailaddress,azureactivedirectoryobjectid" } return "" }, t.prototype._getLpcIdentifiers = function (e, t) { switch (t) { case "contact": return { smtp: e.emailaddress1 }; case "systemuser": return { smtp: e.internalemailaddress, aadObjectId: e.azureactivedirectoryobjectid } }
As Office Fabric JS offers a nice framework for controls the idea is not far away to use the components provided there for your own PCF controls which there are already a few controls shared on https://pcf.gallery like this DatePicker control: https://pcf.gallery/date-picker/
Original Post https://code2life.blogspot.com/2019/11/experiences-with-profile-cards-in.html