Skip to content

KVSFCYGeneralJobManagement#

Procedures#

CheckJPLOnConnectingToJobJnlLine(Record Job Planning Line) :#

Summary: Validates job planning line constraints when connecting to job journal line for usage posting. Ensures that item-type job planning lines connected to sales documents cannot be posted through job journals, as usage posting for such lines must be performed through sales shipment processes to maintain proper document flow. This validation prevents data integrity issues and ensures compliance with Business Central's job posting requirements.

procedure CheckJPLOnConnectingToJobJnlLine(var JobPlanningLineVar: Record "Job Planning Line"): 

Parameters:

  • JobPlanningLineVar: Job planning line record to validate for journal connection compatibility. The procedure checks the line type and sales document connection status.

CreateProdOrder(Record Job Planning Line, Record Production Order, Enum Production Order Status) :#

procedure CreateProdOrder(JobPlanningLine: Record "Job Planning Line"; var ProductionOrder: Record "Production Order"; ProductionOrderStatus: Enum "Production Order Status"): 

Events#

OnBeforeGetJobAccounts(Code[20], Code[20], Code[20], Code[20], Code[20], Boolean, Boolean) :#

Summary: Integration event that is raised before retrieving job accounts based on job type, effort type, and product posting group parameters, providing an extension point for implementing custom job account setup logic or overriding the standard account determination process for job planning line accounting operations.

[IntegrationEvent(false, false)]
local procedure OnBeforeGetJobAccounts(var salesAccountNoVar: Code[20]; var usageAccountNoVar: Code[20]; jobTypeCodePar: Code[20]; jobEffortTypeCodePar: Code[20]; prodPostingGroupPar: Code[20]; var foundJobAccountsRv: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSFCYGeneralJobManagement", 'OnBeforeGetJobAccounts', '', false, false)]
local procedure DoSomethingOnBeforeGetJobAccounts(var salesAccountNoVar: Code[20]; var usageAccountNoVar: Code[20]; jobTypeCodePar: Code[20]; jobEffortTypeCodePar: Code[20]; prodPostingGroupPar: Code[20]; var foundJobAccountsRv: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • salesAccountNoVar: Code[20] variable (passed by reference) that should contain the G/L account number for sales postings if the extension handles account determination, enabling custom sales account assignment for job contract entries.
  • usageAccountNoVar: Code[20] variable (passed by reference) that should contain the G/L account number for usage postings if the extension handles account determination, enabling custom usage account assignment for job ledger entries.
  • jobTypeCodePar: Code[20] value specifying the job type code used for account determination, providing job classification context for account setup and enabling type-specific account mapping logic.
  • jobEffortTypeCodePar: Code[20] value specifying the effort type code from the job task, providing effort classification context for account determination and enabling effort-specific account assignment rules.
  • prodPostingGroupPar: Code[20] value specifying the general product posting group from the job planning line, enabling product-specific account determination and posting group-based account mapping.
  • foundJobAccountsRv: Boolean variable (passed by reference) that should be set to true by the extension if valid job accounts are found and assigned, indicating successful account determination for validation purposes.
  • IsHandled: Boolean variable (passed by reference) that should be set to true by the extension if it has completely handled the job account determination, preventing execution of standard account setup logic.