Camera capabilities, or how to add photo id capturing to a contact screen in Dynamics

By | February 25, 2019

 

It would be a challenge these days to find a single person who does not have any picture id at all. Driver licences, health cards, passports, access cards.. Those id-s are everywhere – I probably have to carry at least 2-3 every day, and there are a few more I have to carry occasionally.

All these id-s are always linked to the clients/contacts/employees/citizens – basically, to the individuals. So it’s not, really, such a far-fetched scenario for an organization (private or government) to come in and say: we have Dynamics, we have records of all those individuals we are working with stored in Dynamics,  can we use Dynamics to issue photo-ids?

The answer is probably “yes”, but this functionality does not necessarily come right out of the box.

There are two distinct scenarios:

  • We can use external camera software and just integrate it with Dynamics to some extent
  • We can use native camera capabilities in Dynamics/Power Apps

 

The first scenario has always been available, and there is probably a whole range of possible solutions.

The second scenario has become increasingly available in the last few years – we actually have different options now, and I tried to summarize them in the table below:

image

SDK scenario does not necessarily fall into the “native capabilities” category. But, technically, one might create an HTML5 snippet, embed it in the model-drive application form, and use the camera that way. Or, possibly, one might create an ActiveX control. Or a custom mobile application.

The other 3 are, really, “out of the box” though each of them comes with a few caveats.

Entity images (https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/image-attributes) won’t really work for the “photo id” scenario. There is  size limitation (144×144) which makes them good for the small avatar-type of images, but they are not good at all for the id-s. However, there is nothing you need to do to make them work.. Just open Dynamics on your phone, open the contact record you want to update the image for, click on the image, and the camera will start.

The next in line is Xrm.Device.captureImage (https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-device/captureimage) This one would work fine if it were available in the web client, and it’s not.

What about the Power App approach? Actually, it works just fine. There is that limitation on the image resolution, but it might be ok for the photo ID applications.

For example, here is the kind of photo id capturing screen we might have in Dynamics if we used a Canvas App:

Not that bad for a couple of hours of work? Well, of course ignoring a day or two it took to figure out how to make it work:) And I will explain how this screen was implemented in the next post..

Leave a Reply

Your email address will not be published. Required fields are marked *