{"id":24260,"date":"2020-07-29T14:51:12","date_gmt":"2020-07-29T14:51:12","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=24260"},"modified":"2020-07-31T06:04:34","modified_gmt":"2020-07-31T06:04:34","slug":"how-to-search-dynamics-365-crm-data-using-scanned-barcode-value-in-canvas-app","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2020\/07\/how-to-search-dynamics-365-crm-data-using-scanned-barcode-value-in-canvas-app\/","title":{"rendered":"How to Search Dynamics 365 CRM data using Scanned Barcode value in Canvas App"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>In our previous <a href=\"https:\/\/www.inogic.com\/blog\/2019\/05\/working-with-barcode-scanner-in-powerapps\/\" target=\"_blank\" rel=\"noopener noreferrer\">blog<\/a> we have explained how to add Barcode Scanner in Power Apps and now we will explore how to search Dynamics 365 CRM data using the scanned barcode value. For example, in a convenience store all the products have barcodes. Once you scan these barcodes you will get the product details like name, price, size, description, etc.<\/p>\n<p>In this blog, we will see how to search entity data from Dynamics 365 CRM using the scanned barcode value in Canvas App. For example, there is product entity in CRM and this product entity data will be shown when user scans the barcode of a particular product.<\/p>\n<p>To achieve this, follow the steps given below:<\/p>\n<p><strong>1<\/strong>. Create a Canvas app and add one Home Screen to it.<\/p>\n<p><strong>2<\/strong>. On that Home Screen add Barcode Scanner from media as shown in below screenshot:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-24261\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/1Scanned-Barcode-value.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"1035\" height=\"261\" \/><\/p>\n<p><strong>3<\/strong>. After adding Barcode Scanner control to your Home Screen, it will be displayed as follows:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-24262\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/2Barcode-Scanned-value-in-Canvas-App.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"193\" height=\"343\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/2Barcode-Scanned-value-in-Canvas-App.png 193w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/2Barcode-Scanned-value-in-Canvas-App-169x300.png 169w\" sizes=\"(max-width: 193px) 100vw, 193px\" \/><\/p>\n<p><strong>4<\/strong>. Now in the \u2018OnScan\u2019 property of Barcode Scanner control you need to add following code.<\/p>\n<p><strong>Launch(BarcodeScanner.Value);Navigate(DetailScreen, ScreenTransition.Fade, { scanvalue: BarcodeScanner.Value } )<\/strong><\/p>\n<p><strong><em>Note:<\/em><\/strong><\/p>\n<p><strong><em>Launch() function is used to launch Barcode Scanner to scan the barcode from product.<\/em><\/strong><\/p>\n<p><strong><em>Navigate() function is used to redirect to Details Screen to view data as per the scanned value.<\/em><\/strong><\/p>\n<p>Refer below screenshot:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-24263\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/2Scanned-Barcode-value.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"1149\" height=\"363\" \/><\/p>\n<p>5. Next, add the data source of product entity which will bind with DetailScreen (Edit Form) as shown in below screenshot:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-24264\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/3Scanned-Barcode-value.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"495\" height=\"553\" \/><\/p>\n<p><strong>6<\/strong>. Now you need to add DetailScreen to view searched record details like name, id, description, price, etc. from CRM Product.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24265\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/4Scanned-Barcode-value.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"1054\" height=\"738\" \/><\/p>\n<p><strong>7<\/strong>. Next, bind Product data source to DetailsScreen (Edit Form) as shown below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-24270\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/5Scanned-Barcode-value.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"1337\" height=\"539\" \/><\/p>\n<p><strong>8<\/strong>. In the \u2018Item\u2019 property of Edit Form you need to add the following code to filter the data using barcode value which is scanned from Barcode Scanner control:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24267\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/6Scanned-Barcode-value.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"1207\" height=\"842\" \/><\/p>\n<p>For example, I have a product ArmBand 150 with product id &#8211; 1234567890 which is our scanned value. We will now search\/filter this record using our app. Barcode scanner value is nothing but the product id field in Dynamics 365 CRM.<\/p>\n<p>You can see below screen shot of Product in CRM. This data will be now populated in Canvas App.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-24268\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/8Barcode-Scanned-value-in-Canvas-App.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"1137\" height=\"471\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/8Barcode-Scanned-value-in-Canvas-App.png 1137w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/8Barcode-Scanned-value-in-Canvas-App-300x124.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/8Barcode-Scanned-value-in-Canvas-App-768x318.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/8Barcode-Scanned-value-in-Canvas-App-1024x424.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/8Barcode-Scanned-value-in-Canvas-App-660x273.png 660w\" sizes=\"(max-width: 1137px) 100vw, 1137px\" \/><\/p>\n<p>Once we scan in app, the corresponding product data will be populated in DetailScreen with all the details as shown below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-24269\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/9Barcode-Scanned-value-in-Canvas-App.png\" alt=\"Barcode Scanned value in Canvas App\" width=\"373\" height=\"643\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/9Barcode-Scanned-value-in-Canvas-App.png 373w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/07\/9Barcode-Scanned-value-in-Canvas-App-174x300.png 174w\" sizes=\"(max-width: 373px) 100vw, 373px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>In this way, we can easily search\/filter Dynamics 365 CRM records in Canvas App based on Scanned Barcode Value.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In our previous blog we have explained how to add Barcode Scanner in Power Apps and now we will explore how to search Dynamics 365 CRM data using the scanned barcode value. For example, in a convenience store all the products have barcodes. Once you scan these barcodes you will get the product details\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2020\/07\/how-to-search-dynamics-365-crm-data-using-scanned-barcode-value-in-canvas-app\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":24272,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1954],"tags":[1867],"class_list":["post-24260","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-canvas-apps","tag-canvas-app"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/24260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=24260"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/24260\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/24272"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=24260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=24260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=24260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}