Mass Delivery Configuration

Previous  Next |  Direct link to this topic

You can use B1 Print and Delivery for mass delivery of different documents.

 

[See Usage Video]

 

[See Configuration Video]

The mass delivery configuration window can be found by navigation to Administration->Add-ons->B1 Usability Package->Module configuration->B1 Print and Delivery->Mass delivery configuration.

B1 Print and Delivery comes with predefined configurations for all the documents supported.

B1 Print and Delivery will auto create the Select SQL needed for the system to work correctly but you have the option to write your own SQL WHERE condition to filter what should be selected for delivery. You can also write your won Order By condition for ordering the result.

 

image068

The configuration window can be divided into three parts.

Part

Description

Header data

Field

Description

Code

Code this is the auto generated number of the configuration

Name

This is your name for the configuration for reference, this is also the name that will be shown in the Mass delivery window combobox

Users

(Empty = All)

Here you have the option to make the Configuration user-specific. All you need to do is to enter the wanted users (their usercodes) separated by “;” (Depending on the user-setting:

        Include users = All users entered will use the configuration

        Exclude users = All users entered will not use the configuration

 

If you do not enter anything, all users will use the configuration

 

Samples:

1.       Entered: manager;user1;user2 (Include users option)

o   The 3 users with usercode “manager”, “user1” and “user2“ will use the configuration.

2.       Entered: user3 (Exclude users option)

o   All users except user with usercode “user3” will use the configuration.

Document type

Here you can select what document type this configuration should handle.

NB: For type “Custom ” please see the special section on that

SQL

This is the auto-generated SQL that will be used for fetching the data needed for the system to function correctly. This cannot be edited.

 

Where condition

Field

Description

Where condition

This is your Where condition to be used for filtering the data.

An example (Invoice document type) could be WHERE T0.CardCode = ‘C20000’ this would when Mass delivery is run only return the Invoices with CardCode = C20000.

SQL Variables

Here you have the option to define up to 20 Variables ([%0], [%1], [%2], [%3] … [%19]) there can be used in the where condition.

NB: SQL VARIABLES CANNOT BE USED IN CONFIGURATIONS THERE IS USED BY THE SCHEDULER/SERVER COMPONENT.

image070

 

Column

Description

Variable

The variable you are defining the source for

Source

The Source. It can a custom value or a list of common values like Business partners etc.

If can find the list of value you wish you also have the option to define a SQL sentence that should retrieve the values as a combobox.

Caption

The caption of the variable (The text shown when prompting the user for the value)

Source SQL

If you in the Source select SQL as source, you define the SQL here (else it is not used). The SQL sentence should be a SELECT statement with two selected columns. first value will be seen as the value of the selection and second will be seen as the description.

SELECT <VALUE>,<DESCRIPTION> FROM <TABLE>

Sample: SELECT CardCode, CardName FROM OCRD

would result in a list of all Business Partners. CardCode will be the value for the customer select and CardName will be the description that help them choose the value.

Title

The title of the window shown when prompting the user for the values

NB: the default title Is ‘Define survey variables’ if no title is given.

Top X Results

Allows you to specify a limitation to the amount of records you would like to include in the result.

 

e.g. if you set this setting to 2, you'll only get the top 2 records that match your SQL.

Order by condition

Field

Description

Order by condition

Here you can write an Order By condition that will decide how the ordering of the result should be. Example: ORDER BY DocEntry DESC

clip0007

Ignore SQL DISTINCT

If you enable this setting, the results will NOT use the DISTINCT keyword in the SQL, which means your result can containt multiples of the same record.

Additional Columns

Here you can write a “,” separated list of additional columns in the database you want to be shown on the mass delivery preview window.

it is possible to use as statements in the additional columns like in SQL/HANA statements

- T1.PymntGroup  AS 'paygroup 1' , T4.PymntGroup AS 'paygroup 2'

 

NB: the additional columns have the following limitations

the original column name cannot contain a comma or white space

the alias for the column cannot contain a comma

image072

NB: if you use joins in the where condition you need to use prefixes on the column names to ensure the correct column is shown.

Warning: If you use JOINs in the where conditional and you add additional columns, make sure those column do not break SQL DISTINCT in you overall SQL (because if it does you might end up with multiple entries of the same object in you runs)

NB: Despite this fields sample looks like SQL it is not. So things like Cast, Converts, IsNull ect. are not supported.

Additional Columns Format

Here it is possible to format the additional columns by giving them a new caption there will be shown as the column header on the mass delivery preview form.

image073

Extra

Field

Description

Active

Is the configuration active

Show in the mass delivery from

Is the configuration to be shown in the mass delivery form

Allow the user to select a different report configuration when running mass delivery

Should the mass delivery from let the user optionally select a different report configuration:

Example without:

image074

Example with:

image075