Architecture

Using RayBarcode, we will explain how to generate barcodes and 2D codes based on data in Salesforce.

The picture above can be enlarged by clicking (tap).

Corresponding barcode

See Barcode Types for a list of barcodes that RayBarcode can generate.

How to Use

Developers can use Visualforce, Lightning components, Web API or SkyVisualEditor to display barcode images in Salesforce. In either method, the barcode image generated is the same. The options available for generating barcode images are the same.

Note that for Lightning components, you need to activate “My Domain”.

Mechanism of operation

RayBarcode generates images on servers managed by MESCIUS outside of Salesforce. This is true for Visualforce, Lightning components, Web API or SkyVisualEditor. You need to register a remote site to allow your Salesforce organization to communicate with this server. The registration of the remote site is displayed to the system administrator when installing RayBarcode, and is registered automatically. Communication between the Salesforce and MESCIUS servers is cryptographically secure.

The token needs to be generated to authorize the remote site to be a legitimate connection. Appforce for Visualforce, Lightning Component and SkyVisualEditor automatically generates tokens and does not require the developer to be aware. You need to add the token generation process only when using the Web API.

AppComponents for Visualforce, Lightning Components and SkyVisualEditor display barcode images within the component, so there is no opportunity for developers to save to records or export barcode images to PDF. Please use Web API to do such processing.

Confirm remote site

You can check the remote site settings in the following steps.

Salesforce Classic :

  1. Click “Settings” from the top of the screen.
  2. Open “Administration > Security Controls > Remote Site Configuration”
  3. Check the following information on the “Set up remote site” screen.
    • Remote site name is “GcBarcodeGenerator”
    • Namespace prefix is “gcbc”
    • URL of remote site is “https://gcbarcode.azurewebsites.net”

Lightning Experience :

  1. Click the gear icon at the top right of the screen, and then click Settings.
  2. Open “Settings > Security > Remote Site Settings”.
  3. Check the following information on the “Set up remote site” screen.
    • Remote site name is “GcBarcodeGenerator”
    • Namespace prefix is “gcbc”
    • URL of remote site is “https://gcbarcode.azurewebsites.net”

Printing

Barcodes and 2D codes generated by RayBarcode can also be used for printing. This document explains PDF output using Visualforce and an example of “スマレポ!”.

Japanese language processing

RayBarcode uses Shift-JIS as the default encoding format. You need to specify an option when using UTF-8. Please refer to Bar Code Options for details.

Reading function “RayKit app” can read Shift-JIS or UTF-8.

Specifications and limitations

  • Please note that there is a difference between the corresponding barcodes of the generation function and the reading function. The scanning function has fewer bar code and two-dimensional code standards. The difference between corresponding barcodes can be compared in [Spec Sheet].
  • For the size of the generated image, the size of the actually generated image is adjusted by the barcode standard. At development time, obtain the optimal size at the time of testing, and specify it again. For example, when you specify to generate a QR code of 200 pixels x 200 pixels in PNG format, what is actually generated is 198 pixels x 198 pixels.
Copyright © MESCIUS inc. All rights reserved.