Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Layers/NA/BaseApp/Projects/Project/Job/JobCard.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,16 @@ page 88 "Job Card"
JobPlanningLines.Run();
end;
}
action("Assigned Resources")
{
ApplicationArea = Jobs;
Caption = 'Assigned Resources';
Image = Users;
RunObject = Page "Job Assigned Resources";
RunPageLink = "Job No." = field("No."),
"Job Task No." = const('');
ToolTip = 'View or edit the resources that are assigned to this project. Project-level assignments apply to all tasks of the project.';
}
action("&Dimensions")
{
ApplicationArea = Dimensions;
Expand Down Expand Up @@ -1842,6 +1852,9 @@ page 88 "Job Card"
actionref(JobPlanningLines_Promoted; JobPlanningLines)
{
}
actionref("Assigned Resources_Promoted"; "Assigned Resources")
{
}
actionref(SalesInvoicesCreditMemos_Promoted; SalesInvoicesCreditMemos)
{
}
Expand Down
13 changes: 13 additions & 0 deletions src/Layers/NA/BaseApp/Projects/Project/Job/JobList.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,16 @@ page 89 "Job List"
ShortCutKey = 'F7';
ToolTip = 'View this project''s statistics.';
}
action("Assigned Resources")
{
ApplicationArea = Jobs;
Caption = 'Assigned Resources';
Image = Users;
RunObject = Page "Job Assigned Resources";
RunPageLink = "Job No." = field("No."),
"Job Task No." = const('');
ToolTip = 'View or edit the resources that are assigned to this project. Project-level assignments apply to all tasks of the project.';
}
action(SalesInvoicesCreditMemos)
{
ApplicationArea = Jobs;
Expand Down Expand Up @@ -927,6 +937,9 @@ page 89 "Job List"
actionref("Job Task &Lines_Promoted"; "Job Task &Lines")
{
}
actionref("Assigned Resources_Promoted"; "Assigned Resources")
{
}
actionref("Ledger E&ntries_Promoted"; "Ledger E&ntries")
{
}
Expand Down
18 changes: 18 additions & 0 deletions src/Layers/NA/BaseApp/Projects/Project/Job/JobTaskLines.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,21 @@ page 1002 "Job Task Lines"
JobPlanningLines.Run();
end;
}
action("Assigned Resources")
{
ApplicationArea = Jobs;
Caption = 'Assigned Resources';
Image = Users;
ToolTip = 'View or edit the additional resources that are explicitly assigned to this project task. Project-level assignments are managed from the project and are not shown on the project tasks.';

trigger OnAction()
var
JobAssignedResourcesPage: Page "Job Assigned Resources";
begin
if JobAssignedResourcesPage.SetJobTaskContext(Rec) then
JobAssignedResourcesPage.Run();
end;
}
action(JobTaskStatistics)
{
ApplicationArea = Jobs;
Expand Down Expand Up @@ -624,6 +639,9 @@ page 1002 "Job Task Lines"
actionref(JobPlanningLines_Promoted; JobPlanningLines)
{
}
actionref("Assigned Resources_Promoted"; "Assigned Resources")
{
}
actionref("Sales &Invoices/Credit Memos_Promoted"; "Sales &Invoices/Credit Memos")
{
}
Expand Down
18 changes: 18 additions & 0 deletions src/Layers/NA/BaseApp/Projects/Project/Job/JobTaskList.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@ page 1004 "Job Task List"
"Job Task No." = field("Job Task No.");
ToolTip = 'View statistics for the project task.';
}
action("Assigned Resources")
{
ApplicationArea = Jobs;
Caption = 'Assigned Resources';
Image = Users;
ToolTip = 'View or edit the additional resources that are explicitly assigned to this project task. Project-level assignments are managed from the project and are not shown on the project tasks.';

trigger OnAction()
var
JobAssignedResourcesPage: Page "Job Assigned Resources";
begin
if JobAssignedResourcesPage.SetJobTaskContext(Rec) then
JobAssignedResourcesPage.Run();
end;
}
}
}
area(processing)
Expand Down Expand Up @@ -265,6 +280,9 @@ page 1004 "Job Task List"
actionref("Split Planning Lines_Promoted"; "Split Planning Lines")
{
}
actionref("Assigned Resources_Promoted"; "Assigned Resources")
{
}
group(Category_Report)
{
Caption = 'Reports';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ permissionset 6719 "Jobs - Edit"
tabledata "General Ledger Setup" = RM,
tabledata "VAT Setup" = RM,
tabledata Job = RIMD,
tabledata "Job Assigned Resource" = RIMD,
tabledata "Job G/L Account Price" = RIMD,
tabledata "Job Item Price" = RIMD,
tabledata "Job Journal Line" = r,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ permissionset 1087 "Jobs - Read"
tabledata "Duplicate Price Line" = R,
tabledata Job = R,
tabledata "Job Archive" = R,
tabledata "Job Assigned Resource" = R,
tabledata "Job Assigned Resource Archive" = R,
tabledata "Job G/L Account Price" = R,
tabledata "Job Item Price" = R,
tabledata "Job Ledger Entry" = R,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ permissionset 5679 "Jobs - View"
tabledata "Inventory Posting Group" = R,
tabledata "Inventory Posting Setup" = R,
tabledata Job = RM,
tabledata "Job Assigned Resource" = RIMD,
tabledata "Job Ledger Entry" = Rimd,
tabledata "Job Planning Line - Calendar" = RIMD,
tabledata "Job Planning Line" = RIMD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ permissionset 7787 "Jobs Journals - Edit"
tabledata "Item Unit of Measure" = R,
tabledata "Item Variant" = R,
tabledata Job = R,
tabledata "Job Assigned Resource" = R,
tabledata "Job G/L Account Price" = R,
tabledata "Job Item Price" = R,
tabledata "Job Journal Batch" = RI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ permissionset 3414 "Jobs Journals - Post"
tabledata "General Ledger Setup" = R,
tabledata "General Posting Setup" = R,
tabledata Job = R,
tabledata "Job Assigned Resource" = R,
tabledata "Job Journal Batch" = RID,
tabledata "Job Journal Line" = RIMD,
tabledata "Job Journal Template" = RI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,8 @@ permissionset 5117 "D365 AUTOMATION"
tabledata "Item Vendor" = RIMD,
tabledata Job = RIMD,
tabledata "Job Archive" = RIMD,
tabledata "Job Assigned Resource" = RIMD,
tabledata "Job Assigned Resource Archive" = RIMD,
tabledata "Job Buffer" = Rimd,
tabledata "Job Cue" = RIMD,
tabledata "Job Difference Buffer" = Rimd,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ permissionset 732 "D365 BASIC ISV"
tabledata "Item Unit of Measure" = RIMD,
tabledata "Item Variant" = RIMD,
tabledata Job = RIMD,
tabledata "Job Assigned Resource" = RIMD,
tabledata "Job Cue" = RIMD,
tabledata "Job Entry No." = RIMD,
tabledata "Job G/L Account Price" = RIMD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ permissionset 9886 "D365 JOBS, EDIT"
tabledata "Duplicate Price Line" = RIMD,
tabledata Job = IMD,
tabledata "Job Archive" = IMD,
tabledata "Job Assigned Resource" = IMD,
tabledata "Job Assigned Resource Archive" = IMD,
tabledata "Job Cue" = IMD,
tabledata "Job Entry No." = IMD,
tabledata "Job G/L Account Price" = IMD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ permissionset 448 "D365 JOBS, VIEW"
Caption = 'Dynamics 365 View Projects';
Permissions = tabledata Job = R,
tabledata "Job Archive" = R,
tabledata "Job Assigned Resource" = R,
tabledata "Job Assigned Resource Archive" = R,
tabledata "Job Cue" = R,
tabledata "Job Entry No." = R,
tabledata "Job G/L Account Price" = R,
Expand Down
2 changes: 2 additions & 0 deletions src/Layers/W1/BaseApp/Permissions/d365read.permissionset.al
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,8 @@ permissionset 1044 "D365 READ"
tabledata "Item Vendor" = R,
tabledata Job = R,
tabledata "Job Archive" = R,
tabledata "Job Assigned Resource" = R,
tabledata "Job Assigned Resource Archive" = R,
tabledata "Job Buffer" = R,
tabledata "Job Cue" = R,
tabledata "Job Difference Buffer" = R,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,8 @@ permissionset 7931 "D365 TEAM MEMBER"
tabledata "Item Vendor" = RIMD,
tabledata Job = RIMD,
tabledata "Job Archive" = RIMD,
tabledata "Job Assigned Resource" = RIMD,
tabledata "Job Assigned Resource Archive" = RIM,
tabledata "Job Buffer" = Rm,
tabledata "Job Cue" = RM,
tabledata "Job Difference Buffer" = Rm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ permissionset 6121 "INTELLIGENT CLOUD"
tabledata "Item Variant" = R,
tabledata "Item Vendor" = R,
tabledata Job = R,
tabledata "Job Assigned Resource" = R,
tabledata "Job Buffer" = R,
tabledata "Job Cue" = RIMD,
tabledata "Job Difference Buffer" = R,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,11 +674,16 @@ table 5135 "Job Archive"
var
JobTaskArchive: Record "Job Task Archive";
CommentLineArchive: Record "Comment Line Archive";
JobAssignedResourceArchive: Record "Job Assigned Resource Archive";
begin
JobTaskArchive.SetRange("Job No.", "No.");
JobTaskArchive.SetRange("Version No.", "Version No.");
JobTaskArchive.DeleteAll(true);

JobAssignedResourceArchive.SetRange("Job No.", "No.");
JobAssignedResourceArchive.SetRange("Version No.", "Version No.");
JobAssignedResourceArchive.DeleteAll();

CommentLineArchive.SetRange("Table Name", CommentLineArchive."Table Name"::Job);
CommentLineArchive.SetRange("No.", "No.");
CommentLineArchive.SetRange("Version No.", "Version No.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,17 @@ page 5177 "Job Archive Card"
separator(Action64)
{
}
action("Assigned Resources")
{
ApplicationArea = Jobs;
Caption = 'Assigned Resources';
Image = Users;
RunObject = Page "Job Assigned Res. Archive";
RunPageLink = "Job No." = field("No."),
"Job Task No." = const(''),
"Version No." = field("Version No.");
ToolTip = 'View the resources that were assigned to the project in this archived version.';
}
action("Co&mments")
{
ApplicationArea = Comments;
Expand Down Expand Up @@ -702,6 +713,9 @@ page 5177 "Job Archive Card"
actionref(JobPlanningLines_Promoted; JobPlanningLines)
{
}
actionref("Assigned Resources_Promoted"; "Assigned Resources")
{
}
}
group(Category_Category6)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ page 5176 "Job Archive List"
RunPageLink = "Job No." = field("No."), "Version No." = field("Version No.");
ToolTip = 'Plan how you want to set up your planning information. In this window you can specify the tasks involved in a project. To start planning a project or to post usage for a project, you must set up at least one project task.';
}
action("Assigned Resources")
{
ApplicationArea = Jobs;
Caption = 'Assigned Resources';
Image = Users;
RunObject = Page "Job Assigned Res. Archive";
RunPageLink = "Job No." = field("No."),
"Job Task No." = const(''),
"Version No." = field("Version No.");
ToolTip = 'View the resources that were assigned to the project in this archived version.';
}
action("Co&mments")
{
ApplicationArea = Comments;
Expand All @@ -164,6 +175,9 @@ page 5176 "Job Archive List"
actionref("Job Task &Lines_Promoted"; "Job Task &Lines")
{
}
actionref("Assigned Resources_Promoted"; "Assigned Resources")
{
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ codeunit 5139 "Job Archive Management"
Permissions = tabledata "Job Archive" = ri,
tabledata "Job Task Archive" = rim,
tabledata "Job Planning Line Archive" = rim,
tabledata "Job Assigned Resource Archive" = rim,
tabledata "Comment Line" = r,
tabledata "Comment Line Archive" = ri;

Expand Down Expand Up @@ -68,6 +69,8 @@ codeunit 5139 "Job Archive Management"
JobTaskArchive: Record "Job Task Archive";
JobPlanningLine: Record "Job Planning Line";
JobPlanningLineArchive: Record "Job Planning Line Archive";
JobAssignedResource: Record "Job Assigned Resource";
JobAssignedResourceArchive: Record "Job Assigned Resource Archive";
CommentLineTableName: Enum "Comment Line Table Name";
begin
JobArchive.Init();
Expand Down Expand Up @@ -109,6 +112,15 @@ codeunit 5139 "Job Archive Management"
AddCalculatedValuesToJobPlanningLineArchive(JobPlanningLineArchive, JobPlanningLine);
until JobPlanningLine.Next() = 0;

JobAssignedResource.SetRange("Job No.", Job."No.");
if JobAssignedResource.FindSet() then
repeat
JobAssignedResourceArchive.Init();
JobAssignedResourceArchive.TransferFields(JobAssignedResource);
JobAssignedResourceArchive."Version No." := JobArchive."Version No.";
JobAssignedResourceArchive.Insert();
until JobAssignedResource.Next() = 0;

OnAfterStoreJob(Job, JobArchive);
end;

Expand Down Expand Up @@ -208,6 +220,7 @@ codeunit 5139 "Job Archive Management"

RestoreComments(CommentLine."Table Name"::Job, JobArchive."No.", JobArchive."Version No.");
RestoreJobTasks(JobArchive, Job);
RestoreJobAssignedResources(JobArchive, Job);
OnAfterRestoreJob(JobArchive, Job);
Message(RestoreMsg, Job.TableCaption(), JobArchive."No.");
end;
Expand Down Expand Up @@ -281,6 +294,25 @@ codeunit 5139 "Job Archive Management"
until JobPlanningLineArchive.Next() = 0;
end;

local procedure RestoreJobAssignedResources(var JobArchive: Record "Job Archive"; Job: Record Job)
var
JobAssignedResource: Record "Job Assigned Resource";
JobAssignedResourceArchive: Record "Job Assigned Resource Archive";
begin
JobAssignedResource.SetRange("Job No.", Job."No.");
if not JobAssignedResource.IsEmpty() then
JobAssignedResource.DeleteAll();

JobAssignedResourceArchive.SetRange("Job No.", JobArchive."No.");
JobAssignedResourceArchive.SetRange("Version No.", JobArchive."Version No.");
if JobAssignedResourceArchive.FindSet() then
repeat
JobAssignedResource.Init();
JobAssignedResource.TransferFields(JobAssignedResourceArchive);
JobAssignedResource.Insert();
until JobAssignedResourceArchive.Next() = 0;
end;

local procedure CheckJobRestorePermissions(var Job: Record Job; var JobArchive: Record "Job Archive")
var
JobLedgerEntry: Record "Job Ledger Entry";
Expand Down Expand Up @@ -342,6 +374,7 @@ codeunit 5139 "Job Archive Management"
NewJobArchive.Insert();
RenameJobTaskArchive(OldJobNo, NewJobNo, OldJobArchive."Version No.");
RenameJobPlanningLineArchive(OldJobNo, NewJobNo, OldJobArchive."Version No.");
RenameJobAssignedResourceArchive(OldJobNo, NewJobNo, OldJobArchive."Version No.");
RenameCommentLineArchive(OldJobNo, NewJobNo, OldJobArchive."Version No.");
until OldJobArchive.Next() = 0;

Expand Down Expand Up @@ -384,6 +417,23 @@ codeunit 5139 "Job Archive Management"
until OldJobPlanningLineArchive.Next() = 0;
end;

local procedure RenameJobAssignedResourceArchive(OldJobNo: Code[20]; NewJobNo: Code[20]; VersionNo: Integer)
var
NewJobAssignedResourceArchive: Record "Job Assigned Resource Archive";
OldJobAssignedResourceArchive: Record "Job Assigned Resource Archive";
begin
OldJobAssignedResourceArchive.SetLoadFields("Job No.", "Version No.");
OldJobAssignedResourceArchive.SetRange("Job No.", OldJobNo);
OldJobAssignedResourceArchive.SetRange("Version No.", VersionNo);
if OldJobAssignedResourceArchive.FindSet() then
repeat
NewJobAssignedResourceArchive.Init();
NewJobAssignedResourceArchive.TransferFields(OldJobAssignedResourceArchive);
NewJobAssignedResourceArchive."Job No." := NewJobNo;
NewJobAssignedResourceArchive.Insert();
until OldJobAssignedResourceArchive.Next() = 0;
end;

local procedure RenameCommentLineArchive(OldJobNo: Code[20]; NewJobNo: Code[20]; VersionNo: Integer)
var
NewCommentLineArchive: Record "Comment Line Archive";
Expand Down
Loading
Loading