Skip to content

A PCF to use barcode scanner control to lookup

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.md
Notifications You must be signed in to change notification settings

irah2008/Barcode-Lookup

Repository files navigation

Barcode-Lookup

A PCF to use barcode scanner control to populate lookup field in Dynamics 365 mobile app.

  • A simple PCF control that reads the barcode and search in Dataverse with the predefined column and populate the values
  • Configuration should be passed as JSON object which is described below


Releases

Please download the releases here



Sample Configuration

Configuration can be passed to the control via control properties as shown below.

image



Sample Configuration below

{ "entityName": "account", "fieldtoSearch": "accountnumber", "nameColumn": "name", "showNew": false, "defaultviewId": "00000000-0000-0000-00aa-000010001001" }


- entityName : The schema name for the entity to be searched - fieldtoSearch : The field to be searched against with value from barcode - nameColumn : primary name column of the entity being searched - showNew : show new button to be visible lookup control in case the barcode is not found - defaultviewId : default view id to be displayed in the lookup control in case barcode is not found

How does it look

  • Lookup to account is created on contact form, initially it is blank

    image



  • On the Dynamics 365 Mobile App the control appears as QR scanner

    Phone-contact-screen-notfilled

  • - On Click QR is scanned and the output is passed to the search based on the input params

    phone-barcode-scanner



  • - Retrieved value is set to the lookup field.

    Phone-contact-screen-filled



  • - Value is updated back to contact record

    image

  • Thanks to DavidXrm's LookupDropdown for the inspiration

    Thanks to Statelyai's Xstate for the wonderful State machines

    About

    A PCF to use barcode scanner control to lookup

    Resources

    License

    GPL-3.0, GPL-3.0 licenses found

    Licenses found

    GPL-3.0
    LICENSE
    GPL-3.0
    LICENSE.md

    Stars

    Watchers

    Forks

    Packages

    No packages published