Skip to content

KVSKBAContactLib#

Procedures#

GetContNoByNoAndTableID(Code[20], Integer) : Code[20]#

Summary: Retrieves the contact no. associated with a given primary key and table ID.

procedure GetContNoByNoAndTableID(No: Code[20]; TableID: Integer): Code[20]

Parameters:

  • No: Primary key for searching.
  • TableID: Identifier specifying the table type (e.g., Customer, Vendor, Bank Account).

Returns: The contact no. corresponding to the provided primary key and table ID.

GetCurrNoAndTableIDByContNo(Code[20], Code[20], Integer) :#

Summary: Retrieves the preferred no. and table ID associated with the given contact no.

procedure GetCurrNoAndTableIDByContNo(ContactNo: Code[20]; var CurrNo: Code[20]; var CurrTableID: Integer): 

Parameters:

  • ContactNo: The contact number for searching.
  • CurrNo: The preferred no. corresponding to the contact number.
  • CurrTableID: The table ID specifying the type of record (e.g., Customer, Vendor, Bank Account, Contact).

GetSalutCodeByNoAndTableID(Code[20], Integer) : Code[10]#

Summary: Retrieves the salutation code associated with the provided primary key and table ID.

procedure GetSalutCodeByNoAndTableID(No: Code[20]; TableID: Integer): Code[10]

Parameters:

  • No: Primary key for searching.
  • TableID: Identifier specifying the table type (e.g., Customer, Vendor, Bank Account).

Returns: The salutation code corresponding to the provided primary key and table ID.

CalcNumberOfSalesDocByContNo(Code[20], Integer) : Integer#

Summary: Calculates the number of sales documents associated with the provided contact no. and document type.

procedure CalcNumberOfSalesDocByContNo(ContactNo: Code[20]; DocumentType: Integer): Integer

Parameters:

  • ContactNo: The contact no. for whom the documents are to be calculated.
  • DocumentType: The type of document to consider (e.g., sales order, invoice).

Returns: The number of documents related to the provided contact number and document type.

CreateActivityByContNo(Code[20]) :#

Summary: Creates an activity related to the current contact.

procedure CreateActivityByContNo(ContactNo: Code[20]): 

Parameters:

  • ContactNo: The contact number for whom the activity is to be created.

CreateOpportunityByContNo(Code[20]) :#

Summary: Creates an opportunity related to the current contact.

procedure CreateOpportunityByContNo(ContactNo: Code[20]): 

Parameters:

  • ContactNo: The contact no. for whom the opportunity is to be created.

CreatePersonByContNo(Code[20]) :#

Summary: Creates a person contact related to the current contact.

procedure CreatePersonByContNo(ContactNo: Code[20]): 

Parameters:

  • ContactNo: The contact no. for whom the person contact is to be created.

CreatePhoneCallByContNo(Code[20]) :#

Summary: Creates a phone call related to the current contact.

procedure CreatePhoneCallByContNo(ContactNo: Code[20]): 

Parameters:

  • ContactNo: The contact number for whom the phone call is to be created.

CreatePurchDocByContNo(Code[20], Enum Purchase Document Type) :#

procedure CreatePurchDocByContNo(ContactNo: Code[20]; DocumentType: Enum "Purchase Document Type"): 

CreateSalesDocByContNo(Code[20], Enum Sales Document Type) : Code[20]#

procedure CreateSalesDocByContNo(ContactNo: Code[20]; DocumentType: Enum "Sales Document Type"): Code[20]

CreateToDoByContNo(Code[20]) :#

Summary: Creates a to-do related to the current contact no.

procedure CreateToDoByContNo(ContactNo: Code[20]): 

Parameters:

  • ContactNo: The contact number for whom the to-do is to be created.

GetCustNo(Record Contact) : Code[20]#

Summary: Retrieves the customer no. associated with the current contact.

procedure GetCustNo(Contact: Record "Contact"): Code[20]

Parameters:

  • Contact: The contact record for whom the customer no. is to be retrieved.

Returns: The customer number corresponding to the provided contact.

GetVendNo(Record Contact) : Code[20]#

Summary: Retrieves the vendor number associated with the current contact.

procedure GetVendNo(Contact: Record "Contact"): Code[20]

Parameters:

  • Contact: The contact record for whom the vendor number is to be retrieved.

Returns: The vendor number corresponding to the provided contact.

Events#

OnBeforeCreateVendorPart1Tab5050(Record Contact, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnBeforeCreateVendorPart1Tab5050(Contact: Record "Contact"; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAContactLib", 'OnBeforeCreateVendorPart1Tab5050', '', false, false)]
local procedure DoSomethingOnBeforeCreateVendorPart1Tab5050(Contact: Record "Contact"; var Handled: Boolean)
begin
end;

OnCreatePersonByContNoOnBeforeDeleteEmptyContact(Record Contact, Record Contact, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnCreatePersonByContNoOnBeforeDeleteEmptyContact(var Contact: Record "Contact"; CompanyContact: Record "Contact"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAContactLib", 'OnCreatePersonByContNoOnBeforeDeleteEmptyContact', '', false, false)]
local procedure DoSomethingOnCreatePersonByContNoOnBeforeDeleteEmptyContact(var Contact: Record "Contact"; CompanyContact: Record "Contact"; var IsHandled: Boolean)
begin
end;

OnCalcNumberOfSalesDocByContNoOnBeforeCurrTableIDCaseElse(Code[20], Integer, Code[20], Integer, Integer, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnCalcNumberOfSalesDocByContNoOnBeforeCurrTableIDCaseElse(ContNo: Code[20]; DocType: Integer; CurrNo: Code[20]; CurrTableID: Integer; var ReturnValue: Integer; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAContactLib", 'OnCalcNumberOfSalesDocByContNoOnBeforeCurrTableIDCaseElse', '', false, false)]
local procedure DoSomethingOnCalcNumberOfSalesDocByContNoOnBeforeCurrTableIDCaseElse(ContNo: Code[20]; DocType: Integer; CurrNo: Code[20]; CurrTableID: Integer; var ReturnValue: Integer; var Handled: Boolean)
begin
end;

OnCreatePersonByContNoOnAfterModifyContact(Record Contact, Record Contact) :#

[IntegrationEvent(false, false)]
local procedure OnCreatePersonByContNoOnAfterModifyContact(var Contact: Record "Contact"; CompanyContact: Record "Contact"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAContactLib", 'OnCreatePersonByContNoOnAfterModifyContact', '', false, false)]
local procedure DoSomethingOnCreatePersonByContNoOnAfterModifyContact(var Contact: Record "Contact"; CompanyContact: Record "Contact")
begin
end;

OnCreatePersonByContNoOnBeforeModifyContact(Record Contact, Record Contact) :#

[IntegrationEvent(false, false)]
local procedure OnCreatePersonByContNoOnBeforeModifyContact(var Contact: Record "Contact"; CompanyContact: Record "Contact"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAContactLib", 'OnCreatePersonByContNoOnBeforeModifyContact', '', false, false)]
local procedure DoSomethingOnCreatePersonByContNoOnBeforeModifyContact(var Contact: Record "Contact"; CompanyContact: Record "Contact")
begin
end;

OnLookupCockpitByContNoOnBeforeRunModalPage(Record Contact, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnLookupCockpitByContNoOnBeforeRunModalPage(var Contact: Record "Contact"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAContactLib", 'OnLookupCockpitByContNoOnBeforeRunModalPage', '', false, false)]
local procedure DoSomethingOnLookupCockpitByContNoOnBeforeRunModalPage(var Contact: Record "Contact"; var IsHandled: Boolean)
begin
end;

OnUpdatePurchaseQuotesBeforeChangePurchHeader(Record Purchase Header, Record Contact, Record Vendor, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnUpdatePurchaseQuotesBeforeChangePurchHeader(var PurchaseHeader: Record "Purchase Header"; Contact: Record "Contact"; Vendor: Record "Vendor"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAContactLib", 'OnUpdatePurchaseQuotesBeforeChangePurchHeader', '', false, false)]
local procedure DoSomethingOnUpdatePurchaseQuotesBeforeChangePurchHeader(var PurchaseHeader: Record "Purchase Header"; Contact: Record "Contact"; Vendor: Record "Vendor"; var IsHandled: Boolean)
begin
end;