OnBeforeReviewDisplay

<< Click to Display Table of Contents >>

Navigation:  Zetadocs SDK Guide > Zetadocs SDK API >

OnBeforeReviewDisplay

OnBeforeReviewDisplay Event

Runs just before the Zetadocs Review page is displayed. It provides methods to access and update the Zetadocs Review Header and Zetadocs Review Lines. Note it will not be run if there are saved changes for the record from a previous visit to the Zetadocs Review page.

 

Publisher

    [IntegrationEvent(false, false)]

    procedure OnBeforeReviewDisplay(var OnBeforeReviewDisplayHandler: Codeunit "Zetadocs OnBeforeReviewDisplay")

    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", 'OnBeforeReviewDisplay', '', true, true)]

    local procedure OnBeforeReviewDisplay(var OnBeforeReviewDisplayHandler: Codeunit "Zetadocs OnBeforeReviewDisplay")

    begin

    end;

 

Zetadocs OnBeforeReviewDisplay Codeunit

This codeunit exposes procedures that give you access to the Zetadocs Review Header and Zetadocs Review Lines, which are shown for user validation on the Zetadocs Review Screen.

Method name

Description

GetReviewPageData(var reviewHeader: Record "Zetadocs ADE Review Header"; var reviewLines: Record "Zetadocs ADE Lines")

Will return the Zetadocs Review Header and the related Zetadocs Review Lines.

SetReviewPageData(var reviewHeader: Record "Zetadocs ADE Review Header"; var reviewLines: Record "Zetadocs ADE Lines")

Will override the Zetadocs Review Header and the related Zetadocs Review Lines to be displayed with the data provided.

GetCustomFieldsForReviewHeader(var customFields: JsonArray)

Returns the JsonArray of custom fields from the custom layout for the Zetadocs Review Header.

GetCustomFieldsForReviewLine(headerNo: Guid; lineNo: Integer; var lineCustomFields: JsonArray)

Returns the JsonArray of custom fields from the custom layout for the Zetadocs Review Line.

 

GetReviewPageData Method

Will return the Zetadocs Review Header and the related Zetadocs Review Lines.

 

Syntax

OnBeforeReviewDisplayHandler.GetReviewPageData(var reviewHeader: Record "Zetadocs ADE Review Header"; var reviewLines: Record "Zetadocs ADE Lines")

 

Parameters

reviewHeader

Type: Record "Zetadocs ADE Review Header"

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

 

reviewLines

Type: Record "Zetadocs ADE lines"

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

 

SetReviewPageData Method

Will override the Zetadocs Review Line data.

 

Syntax

OnBeforeReviewDisplayHandler.SetReviewPageData(var reviewHeader: Record "Zetadocs ADE Review Header"; var reviewLines: Record "Zetadocs ADE Lines")

 

Parameters

reviewHeader

Type: Record "Zetadocs ADE Review Header"

The temporary record variable that will update the current information of the Zetadocs Review Header.

 

reviewLines

Type: Record "Zetadocs ADE lines"

The temporary record variable that will  update the current information of the Zetadocs Review Lines.

 

GetCustomFieldsForReviewHeader Method

Will return  the JsonArray of custom fields from the custom layout for the Zetadocs Review Header.

 

Syntax

OnBeforeReviewDisplayHandler.GetCustomFieldsForReviewHeader(var customFields: JsonArray)

 

Parameters

customFields

Type: Fields

The variable that will return the JsonArray of custom fields for the Zetadocs Review Header.

This will be an array of key/value objects, for example:
[{ "Key": "Vat No", "Value": "GB12345678" }, {"Key": "BankAccount", "Value": "123456" } ]

 

GetCustomFieldsForReviewLine Method

Will return the JsonArray of custom fields from the custom layout for the Zetadocs Review Line.

 

Syntax

OnBeforeReviewDisplayHandler.GetCustomFieldsForReviewLine(headerNo: Guid; lineNo: Integer; var lineCustomFields: JsonArray))

 

Parameters

headerNo

Type: Guid

The HeaderNo for the Zetadocs Review Header that the Zetadocs Review Line belongs to, that you want to retrieve the custom fields for.

 

lineNo

Type: Integer

The No for the Zetadocs Review Line that the Zetadocs Review Line belongs to, that you want to retrieve the custom fields for.

 

customFields

Type: Fields

The variable that will return the JsonArray of custom fields for the Review Header.

This will be an array of key/value objects, for example:
[{ "Key": "Vat No", "Value": "GB12345678" }, {"Key": "BankAccount", "Value": "123456" } ]