Skip to content

KVSCCCheckManagement#

Procedures#

CheckRecord(Variant, Enum KVSCCAddressType, Boolean) : Enum#

Summary: Checks the given record for sanctions compliance.

procedure CheckRecord(SourceRecord: Variant; AddressType: Enum "KVSCCAddressType"; ForceInvokeWebService: Boolean): Enum KVSCCResult

Parameters:

  • SourceRecord: The record to be checked.
  • AddressType: The address types to be used for the check.
  • ForceInvokeWebService: If set to true, the web service will be invoked even if a valid check already exists.

Returns: The result of the compliance check as an Enum KVSCCResult.

Remarks: If a valid check already exists for the given record and address types, the existing result will be returned unless ForceInvokeWebService is set to true. If no valid check exists, a new check will be performed.

SearchExplicitEntity(Record KVSCCEntity, Boolean) : Boolean#

Summary: Searches for an explicit entity that matches the given entity's source information and checked address.

procedure SearchExplicitEntity(var SearchEntity: Record "KVSCCEntity"; FilterDate: Boolean): Boolean

Parameters:

  • SearchEntity: The entity record to search for.
  • FilterDate: If true, only entities checked within the validity duration will be considered.

Returns: True if a matching entity is found; otherwise, false.

Remarks: This procedure first searches for entities that match the source information and checked address. If any entities are found, it further filters them by name, address, zip, city, and country to find the most recent match.

CopyEntityFromRelated(Record KVSCCEntity, Record KVSCCEntity) :#

Summary: Copies the details from a related entity to another entity.

procedure CopyEntityFromRelated(FromEntity: Record "KVSCCEntity"; var ToEntity: Record "KVSCCEntity"): 

Parameters:

  • FromEntity: The source entity from which to copy details.
  • ToEntity: The target entity to which details will be copied.

Remarks: This procedure copies various fields from the source entity to the target entity, including checked status, result, address details, and request/response data if configured.

SearchRelatedEntity(Record KVSCCEntity, Record KVSCCEntity) : Boolean#

Summary: Searches for a related entity that matches the given entity's checked address.

procedure SearchRelatedEntity(var Entity: Record "KVSCCEntity"; var RelatedEntity: Record "KVSCCEntity"): Boolean

Parameters:

  • Entity: The entity record to search for related entities.
  • RelatedEntity: The found related entity record.

Returns: True if a matching related entity is found; otherwise, false.

Remarks: This procedure searches for entities that match the checked address of the given entity and have been checked within the validity duration.

GetLastCheck(Variant, Enum KVSCCAddressType, Record KVSCCEntity) : Boolean#

Summary: Gets the last compliance check entity for the given source record and address type.

procedure GetLastCheck(SourceRecord: Variant; AddressType: Enum "KVSCCAddressType"; var Entity: Record "KVSCCEntity"): Boolean

Parameters:

  • SourceRecord: The source record to retrieve the last check for.
  • AddressType: The address type to consider for the check.
  • Entity: The found compliance check entity.

Returns: True if a matching entity is found; otherwise, false.

Remarks: This procedure retrieves the last compliance check entity that matches the source record and address type. It uses the SearchExplicitEntity procedure to find the most recent matching entity.

Events#

OnAfterInsertEntry(RecordRef, Enum KVSCCAddressType, Record KVSCCEntity) :#

Summary: Event triggered after inserting a new compliance check entity entry.

[IntegrationEvent(false, false)]
local procedure OnAfterInsertEntry(RecRef: RecordRef; AddressType: Enum "KVSCCAddressType"; var Entity: Record "KVSCCEntity"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSCCCheckManagement", 'OnAfterInsertEntry', '', false, false)]
local procedure DoSomethingOnAfterInsertEntry(RecRef: RecordRef; AddressType: Enum "KVSCCAddressType"; var Entity: Record "KVSCCEntity")
begin
end;

Parameters:

  • RecRef: The record reference of the source record.
  • AddressType: The address type used for the check.
  • Entity: The newly inserted compliance check entity.

Remarks: This integration event allows subscribers to perform additional actions after a new compliance check entity has been inserted.