NumberSequence.Exists(Text [, Boolean]) Method

Version: Available or changed with runtime version 4.0.

Checks whether a specific number sequence exists.

Syntax

Exists :=   NumberSequence.Exists(Name: Text [, CompanySpecific: Boolean])

Parameters

Name
 Type: Text
Specifies the name of the number sequence.

[Optional] CompanySpecific
 Type: Boolean
Specifies if the number sequence is company-specific. Default is true.

Return Value

Exists
 Type: Boolean
Returns true if the number sequence exists.

Example

The following example checks whether the number sequence MyNumberSequence exists, and if so, it deletes it.

if NumberSequence.Exists('MyNumberSequence', false) then
    NumberSequence.Delete('MyNumberSequence', false);

NumberSequence Data Type
Get Started with AL
Developing Extensions