Loading
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Scan Prefixes and Suffixes

          Scan Prefixes and Suffixes

          The scanner event sends all the data that’s included in a prefix-suffix bracket. The prefix and suffix are registered with the Bluetooth scanner and are added to each scanned result automatically. The event only contains the scanned code. For example, if you set ! as the prefix and carriage return as the suffix, scan a barcode representation of 123456 results in !123456\r sent to the device. The bar code event contains only 123456. You can change the prefix and suffix by calling the Facade.updateBTPrefixSuffixAsync() function.

          Facade.updateBTPrefixSuffixAsync(prefix[Code], suffix[Code]) takes either strings or numbers as the parameters. Here are some sample calls to set the scan prefix and suffix.

          Facade.updateBTPrefixSuffixAsync("!", "\n"); // Sets the prefix to "!" and the suffix toline feed (\n)

          Facade.updateBTPrefixSuffixAsync(65, 32); // Sets the prefix to "A" and the suffix to " "

          Facade.updateBTPrefixSuffixAsync("_", 13); // Sets the prefix zu "_" and the suffix tocarriage return (\r)

          Important
          Important If the scanner settings don’t match the app settings, you can’t scan the barcodes correctly. Here are the default values.
          ASCII ValueHEXCharacter
          62 3E >
          13 0D \r

          If the default values don’t match your scanner settings, either change the app settings by calling the Facade.updateBTPrefixSuffixAsync() function or change the scanner settings to match the default values.

          Important
          Important Barcode scan without a prefix or suffix doesn’t trigger the event.
           
          Loading
          Salesforce Help | Article