Table of Contents

KVSMEDAdditionalFieldSalesLib

Procedures

InsertScheduleLineAddFieldValues(Variant) : Boolean

Summary: Inserts or updates additional field values for a schedule line (Delivery Schedule Line or Billing Schedule Line). Transfers additional field values from base data (item, resource, unit of measure, variant, work type, contract version line) and control values to the schedule line.

procedure InsertScheduleLineAddFieldValues(ScheduleRecordVariant: Variant): Boolean

Parameters:

  • ScheduleRecordVariant: A record of type KVSMEDDeliveryScheduleLine or KVSMEDBillingScheduleLine.

Returns: True if the additional field values were successfully inserted or updated, otherwise false.

ValidateNoInSalesLine(Record Sales Line, Record Sales Line) :

Summary: Handles the validation of the No. field on a Sales Line for additional fields. Deletes existing additional field values when the No. changes and transfers new values from master data.

procedure ValidateNoInSalesLine(SalesLinePar: Record "Sales Line"; XSalesLinePar: Record "Sales Line"): 

Parameters:

  • SalesLinePar: The current Sales Line record after validation.
  • XSalesLinePar: The previous Sales Line record before validation.

Events

OnBeforeTransferAddFieldValuesToScheduleLine(Enum KVSMEDScheduleType, BigInteger, Integer, Code[20], Code[20], Integer, Code[20], Integer, Record KVSMEDSalesScheduleLineAddFld, Boolean) :

Summary: Integration event that is raised before transferring additional field values to a schedule line. Subscribers can use this event to modify or extend the logic for transferring additional field values.

[IntegrationEvent(false, false)]
local procedure OnBeforeTransferAddFieldValuesToScheduleLine(KVSMEDScheduleType: Enum "KVSMEDScheduleType"; ScheduleLineNo: BigInteger; TableId: Integer; KeyFieldCode1: Code[20]; KeyFieldCode2: Code[20]; KeyFieldInteger: Integer; ProcessNo: Code[20]; ProcessPeriodNo: Integer; var TempKVSMEDSalesScheduleLineAddFld: Record "KVSMEDSalesScheduleLineAddFld" temporary; var IsHandled: Boolean): 

Parameters:

  • KVSMEDScheduleType: The type of schedule (delivery or billing schedule line).
  • ScheduleLineNo: The unique identifier of the schedule line.
  • TableId: The table ID of the base data source from which additional field values are being transferred.
  • KeyFieldCode1: The first key value (Code[20]) identifying the source record.
  • KeyFieldCode2: The second key value (Code[20]) identifying the source record.
  • KeyFieldInteger: The integer key value identifying the source record.
  • ProcessNo: The process number associated with the schedule line.
  • ProcessPeriodNo: The process period number associated with the schedule line.
  • TempKVSMEDSalesScheduleLineAddFld: Temporary record containing the additional field values to be transferred to the schedule line.
  • IsHandled: Set to true if the subscriber handles the transfer completely and the default logic should be skipped.

Remarks: This event allows customization of the additional field transfer process before the standard logic executes. If IsHandled is set to true, the standard transfer logic will be bypassed.