KVSFCYJobAddressManagement#
Procedures#
SetSellToDataFromContact(Record Job, Record Contact) :#
Summary: Populates job sell-to address and contact information from a contact record and its associated company contact. When a sell-to contact is specified, retrieves the company contact information to populate all sell-to address fields including name, address components, country/region, language, and contact details. If no sell-to contact is provided and no bill-to customer exists, clears all sell-to fields. Updates responsibility center based on user setup management and synchronizes the information with any associated location cards linked to the job. Essential for maintaining consistent address information across job management, contact management, and location tracking systems.
procedure SetSellToDataFromContact(var JobVar: Record "Job"; ContactPar: Record "Contact"):
Parameters:
JobVar: Job record to update with sell-to address and contact information from the contact data.ContactPar: Contact record providing the source contact information, must have a valid company number for address population.
SetSellToDataFromCustomer(Record Job) :#
Summary: Populates job sell-to address and billing information from a customer record with automatic bill-to customer assignment. When a sell-to customer is specified, retrieves all customer address fields, contact information, language settings, and responsibility center based on customer setup. Automatically assigns bill-to customer using either the customer's designated bill-to customer or defaults to the sell-to customer. When no sell-to customer is provided, clears all related fields and validates empty bill-to customer. Updates responsibility center through user setup management and synchronizes information with any associated location cards. Essential for maintaining consistent customer data flow between job management, customer management, and location tracking systems.
procedure SetSellToDataFromCustomer(var JobVar: Record "Job"):
Parameters:
JobVar: Job record to update with sell-to customer address, contact information, and automatic bill-to customer assignment.
Events#
OnBeforeModifySynchronizeWithLocationCard(Record Job, Record Location) :#
Summary: Integration event that is raised before modifying a location card during job address synchronization, providing an extension point for implementing custom location field updates, additional validation logic, or supplementary data synchronization between job records and associated location cards in the warehouse management system.
[IntegrationEvent(false, false)]
local procedure OnBeforeModifySynchronizeWithLocationCard(var Job: Record "Job"; var Location: Record "Location"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYJobAddressManagement", 'OnBeforeModifySynchronizeWithLocationCard', '', false, false)]
local procedure DoSomethingOnBeforeModifySynchronizeWithLocationCard(var Job: Record "Job"; var Location: Record "Location")
begin
end;
Parameters:
Job: Job record (passed by reference) containing the source address and contact information that is being synchronized to the location card, providing context for custom location updates and validation logic.Location: Location record (passed by reference) that will be modified with job address information, allowing extensions to perform additional field updates, custom validation, or supplementary data synchronization before the location modification is committed.