ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 1390 Document Notification - OnBeforeCopyBillToCustomerAddressFieldsFromSalesDocument

Open Nyryus opened this issue 7 years ago • 0 comments

Please add this event.

LOCAL [IntegrationEvent] OnBeforeCopyBillToCustomerAddressFieldsFromSalesDocument(VAR ModifyCustomerAddressNotification : Notification;VAR SalesHeader : Record "Sales Header")

We need this event to block this functionality based on some setups executed on an our extension.

[External] CopyBillToCustomerAddressFieldsFromSalesDocument(ModifyCustomerAddressNotification : Notification)
IF NOT ModifyCustomerAddressNotification.HASDATA(SalesHeader.FIELDNAME("Bill-to Customer No.")) THEN
  EXIT;

OnBeforeCopyBillToCustomerAddressFieldsFromSalesDocument(ModifyCustomerAddressNotification, SalesHeader);

// Document Type
EVALUATE(SalesHeader."Document Type",ModifyCustomerAddressNotification.GETDATA(SalesHeader.FIELDNAME("Document Type")));
SalesHeader.GET(SalesHeader."Document Type",ModifyCustomerAddressNotification.GETDATA(SalesHeader.FIELDNAME("No.")));

Nyryus avatar Aug 09 '19 10:08 Nyryus