KVSKBAReqPageAdvOptionHandling#
Procedures#
GetOptions1Values(List, Text, Text) :#
procedure GetOptions1Values(var OptionList: List; var DefaultValue: Text; var Caption: Text):
GetOptions2Values(List, Text, Text) :#
procedure GetOptions2Values(var OptionList: List; var DefaultValue: Text; var Caption: Text):
LookupOptionValue(Text, List) : Boolean#
procedure LookupOptionValue(var OptionValue: Text; OptionValues: List): Boolean
ReturnOption1Value(Text, Text) :#
Summary: Notifies subscribers about the selected value for option 1 on report request pages.
procedure ReturnOption1Value(OptionRefID: Text; OptionValue: Text):
Parameters:
OptionRefID: Reference identifier for the report or context where the option is used.OptionValue: Selected option value to be returned to subscribers.
Remarks: This procedure provides a callback mechanism for extensions to receive and process the user's selection for the first option field. It raises the OnReturnOption1Value integration event, passing the option reference ID, selected value, and current user's security ID. Subscribers can use this to store user preferences, apply business logic based on the selection, or trigger dependent actions. The UserSecurityId is included to enable user-specific option handling or logging. This is called after the user has made a selection and the report request page is processing the values.
ReturnOption2Value(Text, Text) :#
Summary: Notifies subscribers about the selected value for option 2 on report request pages.
procedure ReturnOption2Value(OptionRefID: Text; OptionValue: Text):
Parameters:
OptionRefID: Reference identifier for the report or context where the option is used.OptionValue: Selected option value to be returned to subscribers.
Remarks: This procedure provides a callback mechanism for extensions to receive and process the user's selection for the second option field. It raises the OnReturnOption2Value integration event, passing the option reference ID, selected value, and current user's security ID. Subscribers can use this to store user preferences, apply business logic based on the selection, or trigger dependent actions. The UserSecurityId is included to enable user-specific option handling or logging. This works in parallel with ReturnOption1Value for reports using two independent option fields.
ValidateOption1Value(Text, Text, Text, Integer) :#
Summary: Validates and potentially modifies the value of option 1, with access to option 2's value for dependent validation.
procedure ValidateOption1Value(OptReference: Text; var Option1Value: Text; var Option2Value: Text; ReportID: Integer):
Parameters:
OptReference: Reference identifier for the context or report using the options.Option1Value: Current value of option 1; can be modified by subscribers during validation.Option2Value: Current value of option 2; can be read or modified by subscribers for cascading logic.ReportID: Report ID for context-specific validation rules.
Remarks: This procedure enables validation logic for the first option field on report request pages through the OnValidateOption1Value integration event. Subscribers can validate the Option1Value, apply business rules, modify either option value based on dependencies, or raise errors for invalid combinations. Both option values are passed by reference, allowing cascading updates where changing option 1 can automatically adjust option 2. The ReportID parameter enables report-specific validation rules. This is typically called during the OnValidate trigger of the option field.
ValidateOption2Value(Text, Text, Text, Integer) :#
Summary: Validates and potentially modifies the value of option 2, with access to option 1's value for dependent validation.
procedure ValidateOption2Value(OptReference: Text; var Option1Value: Text; var Option2Value: Text; ReportID: Integer):
Parameters:
OptReference: Reference identifier for the context or report using the options.Option1Value: Current value of option 1; can be read or modified by subscribers for cascading logic.Option2Value: Current value of option 2; can be modified by subscribers during validation.ReportID: Report ID for context-specific validation rules.
Remarks: This procedure enables validation logic for the second option field on report request pages through the OnValidateOption2Value integration event. Subscribers can validate the Option2Value, apply business rules, modify either option value based on dependencies, or raise errors for invalid combinations. Both option values are passed by reference, allowing cascading updates where changing option 2 can automatically adjust option 1. The ReportID parameter enables report-specific validation rules. This works in parallel with ValidateOption1Value to support bidirectional dependencies between option fields.
Events#
OnGetOption1Values(List, Text, Text, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnGetOption1Values(var OptionList: List; var DefaultValue: Text; var Caption: Text; var Handled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAReqPageAdvOptionHandling", 'OnGetOption1Values', '', false, false)]
local procedure DoSomethingOnGetOption1Values(var OptionList: List; var DefaultValue: Text; var Caption: Text; var Handled: Boolean)
begin
end;
OnGetOption2Values(List, Text, Text, Boolean) :#
[IntegrationEvent(false, false)]
local procedure OnGetOption2Values(var OptionList: List; var DefaultValue: Text; var Caption: Text; var Handled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAReqPageAdvOptionHandling", 'OnGetOption2Values', '', false, false)]
local procedure DoSomethingOnGetOption2Values(var OptionList: List; var DefaultValue: Text; var Caption: Text; var Handled: Boolean)
begin
end;
OnReturnOption1Value(Text, Text, Text) :#
Summary: Integration event raised when option 1 value is returned from the report request page.
[IntegrationEvent(false, false)]
local procedure OnReturnOption1Value(OptionRefID: Text; OptionValue: Text; UserSecurityID: Text):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAReqPageAdvOptionHandling", 'OnReturnOption1Value', '', false, false)]
local procedure DoSomethingOnReturnOption1Value(OptionRefID: Text; OptionValue: Text; UserSecurityID: Text)
begin
end;
Parameters:
OptionRefID: Reference identifier for the report or context.OptionValue: Selected value for option 1.UserSecurityID: Security ID of the user who made the selection.
Remarks: This event allows extensions to receive and process the user's selection for the first option field. Subscribers can store user preferences in custom tables, log the selection for audit purposes, apply business logic that depends on the option value, or prepare data for report processing. The UserSecurityID enables user-specific handling such as storing per-user default selections or applying user-based security rules. This event is raised after the user has confirmed the report request page and the values are being processed.
OnReturnOption2Value(Text, Text, Text) :#
Summary: Integration event raised when option 2 value is returned from the report request page.
[IntegrationEvent(false, false)]
local procedure OnReturnOption2Value(OptionRefID: Text; OptionValue: Text; UserSecurityID: Text):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAReqPageAdvOptionHandling", 'OnReturnOption2Value', '', false, false)]
local procedure DoSomethingOnReturnOption2Value(OptionRefID: Text; OptionValue: Text; UserSecurityID: Text)
begin
end;
Parameters:
OptionRefID: Reference identifier for the report or context.OptionValue: Selected value for option 2.UserSecurityID: Security ID of the user who made the selection.
Remarks: This event allows extensions to receive and process the user's selection for the second option field. Subscribers can store user preferences in custom tables, log the selection for audit purposes, apply business logic that depends on the option value, or prepare data for report processing. The UserSecurityID enables user-specific handling such as storing per-user default selections or applying user-based security rules. This event works in parallel with OnReturnOption1Value for reports using two option fields, enabling separate or combined processing of both selections.
OnValidateOption1Value(Text, Text, Text, Integer) :#
Summary: Integration event for validating option 1 value with potential cascading effects on option 2.
[IntegrationEvent(false, false)]
local procedure OnValidateOption1Value(OptReference: Text; var Option1Value: Text; var Option2Value: Text; ReportID: Integer):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAReqPageAdvOptionHandling", 'OnValidateOption1Value', '', false, false)]
local procedure DoSomethingOnValidateOption1Value(OptReference: Text; var Option1Value: Text; var Option2Value: Text; ReportID: Integer)
begin
end;
Parameters:
OptReference: Reference identifier for the context or report.Option1Value: Current value of option 1; can be modified by subscribers.Option2Value: Current value of option 2; can be modified by subscribers for cascading logic.ReportID: Report ID for context-specific validation.
Remarks: This event enables extensions to implement validation and business logic when option 1 is modified on a report request page. Subscribers can validate the Option1Value against business rules, modify it to enforce formatting or constraints, automatically adjust Option2Value based on the selection (cascading logic), or raise errors for invalid values or combinations. Both option values are passed by reference, enabling bidirectional dependencies. The ReportID parameter allows report-specific validation rules. This is essential for enforcing data integrity and implementing dependent option field behavior on report request pages.
OnValidateOption2Value(Text, Text, Text, Integer) :#
Summary: Integration event for validating option 2 value with potential cascading effects on option 1.
[IntegrationEvent(false, false)]
local procedure OnValidateOption2Value(OptReference: Text; var Option1Value: Text; var Option2Value: Text; ReportID: Integer):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAReqPageAdvOptionHandling", 'OnValidateOption2Value', '', false, false)]
local procedure DoSomethingOnValidateOption2Value(OptReference: Text; var Option1Value: Text; var Option2Value: Text; ReportID: Integer)
begin
end;
Parameters:
OptReference: Reference identifier for the context or report.Option1Value: Current value of option 1; can be modified by subscribers for cascading logic.Option2Value: Current value of option 2; can be modified by subscribers.ReportID: Report ID for context-specific validation.
Remarks: This event enables extensions to implement validation and business logic when option 2 is modified on a report request page. Subscribers can validate the Option2Value against business rules, modify it to enforce formatting or constraints, automatically adjust Option1Value based on the selection (reverse cascading logic), or raise errors for invalid values or combinations. Both option values are passed by reference, enabling bidirectional dependencies. The ReportID parameter allows report-specific validation rules. This works in parallel with OnValidateOption1Value to support complex interdependencies between the two option fields.