locked
Upload a picture through a webcam in Dynamic crm 2011. RRS feed

  • Question

  • I want to upload pictures taken by a webcam then and there when creating a new form entity. I am using this 

    http://crmattachmentimage.codeplex.com/documentation

    on codeplex. It does come close to what I want and allows me to multiple pictures through webcam but the thing is it is not saving the pictures. Has anyone used it? or can suggest me another solution. 

    Tuesday, August 13, 2013 9:58 AM

Answers

  • I just installed it to try it out and it's working fine for me.

    Did you clearly follow the instructions?

    1. Upload the XAP from the compiled folder as a Silverlight web resource (v4.0)
    2. Create a new single line of text field and add it to the form (i called mine 'new_photoid')
    3. Insert the XAP web resource onto your form
    4. Tick the box to 'pass record object-type code and unique identifier as parameters'
    5. Enter the Custom Parameter(data), I used: field=new_photoid|subject='%s'|prefix='img-'|webcam='true'

    Please clearly follow those instructions and let me know if it still doesn't work, and if not at what point does it fail.

    Leave the photo id field visible at first, as you should be able to see the attachment ID being populated into that field immediately after taking the photo. There should also be a note/attachment added to the form.

    Also note that to actually take the photo, you need to first click the webcam icon to start the webcam, and then click it again to take the photo.

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Marked as answer by Hamzak Thursday, August 15, 2013 10:14 AM
    Tuesday, August 13, 2013 8:20 PM
  • When I try it, I click the webcam icon once to start the webcam (as it seems you have) then when I click the same icon again, it captures the image, and instantly prefills the attachmentid field. Does anything happen when you click the icon again? If not I would double check the config of the web resource on the form, in particular those parameters.

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Marked as answer by Hamzak Thursday, August 15, 2013 10:14 AM
    Wednesday, August 14, 2013 10:43 AM

All replies

  • I just installed it to try it out and it's working fine for me.

    Did you clearly follow the instructions?

    1. Upload the XAP from the compiled folder as a Silverlight web resource (v4.0)
    2. Create a new single line of text field and add it to the form (i called mine 'new_photoid')
    3. Insert the XAP web resource onto your form
    4. Tick the box to 'pass record object-type code and unique identifier as parameters'
    5. Enter the Custom Parameter(data), I used: field=new_photoid|subject='%s'|prefix='img-'|webcam='true'

    Please clearly follow those instructions and let me know if it still doesn't work, and if not at what point does it fail.

    Leave the photo id field visible at first, as you should be able to see the attachment ID being populated into that field immediately after taking the photo. There should also be a note/attachment added to the form.

    Also note that to actually take the photo, you need to first click the webcam icon to start the webcam, and then click it again to take the photo.

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Marked as answer by Hamzak Thursday, August 15, 2013 10:14 AM
    Tuesday, August 13, 2013 8:20 PM
  • Paul 

    I followed these instructions perfectly fine. Here are the images to help you help me. 

    The first is the note section that stays empty after i save the image and the second is the image that is taken by the webcam. As you can see after i save the image the image attachment field(one in black square) stays empty. When I save the record and open it again there is no saved image attached to the record. And yes the name of the text field has been passed in the parameters, it is inmate_imageattachment.
    The issue is that the image is not saving at all after I take the picture. PLEASE HELP I AM STUCK HERE AND I HAVE TO HAVE THIS FUNCTIONALITY.

    Thank you


    • Edited by Hamzak Wednesday, August 14, 2013 10:35 AM
    Wednesday, August 14, 2013 10:33 AM
  • When I try it, I click the webcam icon once to start the webcam (as it seems you have) then when I click the same icon again, it captures the image, and instantly prefills the attachmentid field. Does anything happen when you click the icon again? If not I would double check the config of the web resource on the form, in particular those parameters.

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Marked as answer by Hamzak Thursday, August 15, 2013 10:14 AM
    Wednesday, August 14, 2013 10:43 AM
  • No it does not fills the attachment id field. I have tried waiting for some time too. When I click the icon again it captures the picture but does not fills the field, hence it does not save it either. 

    I just added the xap file as a web resource to the form and have checked the parameters. I think the only parameter that should be important here is the name of the text field and its inmate_attachment id .

    Here are my parameters: field=inmate_imageattachment|subject='%s'|prefix='img-'|webcam='true'

    Do you think there are some kind of services that I need? Btw I have crm 2011 on premise rollup 13.

    Wednesday, August 14, 2013 11:05 AM
  • Its working on CRM-Online for me.  I have no idea what the hell is wrong in on premise.
    • Edited by Hamzak Wednesday, August 14, 2013 3:54 PM
    Wednesday, August 14, 2013 3:50 PM
  • I was testing it on premise, so it may just be something to do with your server.

    Maybe try configure it on a different instance, or a different entity and see if you can get it working, or try exporting the working example from CRM online and import that into your on premise instance.

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Wednesday, August 14, 2013 7:31 PM
  • Hi Paul 

    The issue with on premise was with the url that is used to access your deployment. I noticed that my claim based configuration was turned on and that uses https rather than http which I was using to access my deployment. This was causing issues with the get url method in the code of the plugin. I turned off the claim based authentication and checked the HTTP in deployment manager properties and everything is set to go, although it is a little slow. 

    Thank you for you help and support. You did put me in the right path. :D

    Thursday, August 15, 2013 10:14 AM
  • Hi

    Can you tell me please if this steps and solution works in Dynamics CRM 2016?

    Thank you  for your help

    Friday, May 20, 2016 2:12 PM
  • The solution definitely works but I don't know whether it is compatible with CRM 2016.
    Friday, May 20, 2016 2:16 PM
  • i follow these instructions but nothing work,please correct me if i'm wrong

    1-i  upoladed CrmAttachmentImage.xap as web ressource

    2-i created a text-field that is not searchable (name=imageattachmentid)

    3-i added CrmAttachmentImage.xap web ressource in the invoice form

    4-i Checked the checkbox to pass the id and type, etc and i added  the fields and their values seperated by a pipe in parameters like this one

    field=new_imageattachmentid|subject='Facture''s Image'|prefix='img-'

    thank you for your help

    Friday, May 20, 2016 2:27 PM