Skip to content

KVSADVManualSubscriberStorage#

Summary: This codeunit serves as a Variable Storage to share data between subcribers. It does so by using manual event subscriptions to avoid a central disadvantage of single instance codeunits: If an error occurs they don't get reset which may lead to a single instance codeunit to hold invalid data and hence affecting further actions. Hence this codeunit should be used whereever possible over the single instance storage.

Events#

OnSetValue(Text, Text) :#

[IntegrationEvent(false, false)]
local procedure OnSetValue(DictKey: Text; DictValue: Text): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVManualSubscriberStorage", 'OnSetValue', '', false, false)]
local procedure DoSomethingOnSetValue(DictKey: Text; DictValue: Text)
begin
end;

OnGetValue(Text, Text, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnGetValue(DictKey: Text; var DictValue: Text; ClearValue: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVManualSubscriberStorage", 'OnGetValue', '', false, false)]
local procedure DoSomethingOnGetValue(DictKey: Text; var DictValue: Text; ClearValue: Boolean)
begin
end;