OnValidateReviewLine

<< Click to Display Table of Contents >>

Navigation:  Zetadocs SDK Guide > Zetadocs SDK API >

OnValidateReviewLine

OnValidateReviewLine Event

Runs after the fields of the Zetadocs Review line have been modified. It provides methods to access and update the Zetadocs Review line. This method is intended to ensure the validity of data and to raise an error if required. It also offers the possibility to consolidate the data instead.

 

Publisher

    [IntegrationEvent(false, false)]

    procedure OnAddDefaultsToReviewLine(var OnAddDefaultsToReviewLineHandler: Codeunit "Zdd OnAddDefaultsToReviewLine")

    begin

    end;

 

Subscriber

To subscribe to this event, you will need to decorate the subscriber method with the correct EventSubscriber attributes:

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Zetadocs Customize", 'OnAddDefaultsToReviewLine', '', true, true)]

    local procedure OnAddDefaultsToReviewLine(var onAddDefaultsToReviewLineHandler: Codeunit "Zdd OnAddDefaultsToReviewLine")

    begin

    end;

 

Zdd OnValidateReviewLine codeunit

This codeunit exposes procedures that give you access to the Zetadocs Review Line, which is shown for user validation on the Zetadocs Review Screen.

Method name

Description

GetReviewDocumentType(var Enum Zetadocs Review Document Type)

Will return the information about context of the header related to the review line.

GetReviewLine(Record "Zetadocs ADE lines"):

Will return the Zetadocs Review Line.

SetReviewLine(Record "Zetadocs ADE lines")

Will override the Zetadocs Review Line with the data provided.

SetError(Text)

Will raise raise a validation error to the user.

 

GetReviewDocumentType Method

Will return the header information related to the review line.

 

Syntax

onAddDefaultsToReviewLineHandler.GetReviewDocumentType(

       var headerDocumentType: Enum "Zetadocs Review Document Type")

 

Parameters

headerDocumentType

Type:  Enum "Zetadocs Review Document Type"

The type of document being processed.

 

GetReviewLine Method

Will return the Zetadocs Review Line record.

 

Syntax

onAddDefaultsToReviewLineHandler.GetReviewLine(var temporaryZetadocsReviewLine: Record "Zetadocs ADE lines")

 

Parameters

documentIdstemporaryZetadocsReviewLine

Type: Record "Zetadocs ADE lines"

The temporary record variable that will store a the current information of the Zetadocs Review Line.

 

SetReviewLine Method

Will override the Zetadocs Review Line data.

 

Syntax

onAddDefaultsToReviewLineHandler.SetReviewLine(var temporaryZetadocsReviewLine: Record "Zetadocs ADE lines")

 

Parameters

temporaryZetadocsReviewLine

Type: Record Record "Zetadocs ADE lines"

The record variable that will update the current information for the Zetadocs Review Line.

 

SetError Method

Will raise an error including the provided text.

 

Syntax

onAddDefaultsToReviewLineHandler.SetError(errorText: Text")

 

Parameters

errorText

Type: Text

The message to be displayed to the user when the validation fails.