Skip to content

[Event Request] OnAfterUpdateJobTaskDimension table 167 Job #29635

@jazadv

Description

@jazadv

Why do you need this change?

I would like you to add an OnAfterUpdateJobTaskDimension event to the UpdateJobTaskDimension procedure so that other related tables can be updated when the user confirms they want to update dimension on lines.

Describe the request

My suggestion is to create an event as below:

  local procedure UpdateJobTaskDimension(FieldNumber: Integer; ShortcutDimCode: Code[20])
    var
        JobTask: Record "Job Task";
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnBeforeUpdateJobTaskDimension(Rec, FieldNumber, ShortcutDimCode, IsHandled);
        if IsHandled then
            exit;

        if GuiAllowed() and (not GetHideValidationDialog()) then
            if not Confirm(UpdateJobTaskDimQst, false) then
                exit;

        JobTask.SetRange("Job No.", "No.");
        if JobTask.FindSet(true) then
            repeat
                case FieldNumber of
                    1:
                        JobTask.Validate("Global Dimension 1 Code", ShortcutDimCode);
                    2:
                        JobTask.Validate("Global Dimension 2 Code", ShortcutDimCode);
                end;
                JobTask.Modify();
            until JobTask.Next() = 0;

	OnAfterUpdateJobTaskDimension(Rec, FieldNumber, ShortcutDimCode)  // Line added
    end;
    [IntegrationEvent(false, false)]
    local procedure OnAfterUpdateJobTaskDimension(var Job: Record Job; FieldNumber: Integer; ShortcutDimCode: Code[20])
    begin
    end;

Internal work item: AB#619651

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions