Page 5975 Posted Service Shipment
- App
- Base Application
- Namespace
- Microsoft.Service.History
- Versions
- 17-28
- Source table
- 5990
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Service/History/PostedServiceShipment.Page.al903 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Service.History;
using Microsoft.CRM.Contact;
using Microsoft.Finance.Dimension;
using Microsoft.Foundation.Address;
using Microsoft.Projects.Project.Ledger;
using Microsoft.Service.Comment;
using Microsoft.Service.Document;
using Microsoft.Service.Email;
using Microsoft.Service.Ledger;
using Microsoft.Utilities;
page 5975 "Posted Service Shipment"
{
Caption = 'Posted Service Shipment';
DeleteAllowed = false;
InsertAllowed = false;
ModifyAllowed = false;
PageType = Document;
RefreshOnActivate = true;
SourceTable = "Service Shipment Header";
layout
{
area(content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.")
{
ApplicationArea = Service;
Editable = false;
Importance = Promoted;
}
field(Description; Rec.Description)
{
ApplicationArea = Service;
Editable = false;
}
field("Customer No."; Rec."Customer No.")
{
ApplicationArea = Service;
Editable = false;
Importance = Promoted;
}
field("Contact No."; Rec."Contact No.")
{
ApplicationArea = Service;
Editable = false;
}
group("Sell-to")
{
Caption = 'Sell-to';
field(Name; Rec.Name)
{
ApplicationArea = Service;
Editable = false;
}
field("Name 2"; Rec."Name 2")
{
ApplicationArea = Service;
Editable = false;
Visible = false;
}
field(Address; Rec.Address)
{
ApplicationArea = Service;
Editable = false;
}
field("Address 2"; Rec."Address 2")
{
ApplicationArea = Service;
Editable = false;
}
field(City; Rec.City)
{
ApplicationArea = Service;
Editable = false;
}
group(Control17)
{
ShowCaption = false;
Visible = IsSellToCountyVisible;
field(County; Rec.County)
{
ApplicationArea = Service;
Editable = false;
}
}
field("Post Code"; Rec."Post Code")
{
ApplicationArea = Service;
Editable = false;
}
field("Country/Region Code"; Rec."Country/Region Code")
{
ApplicationArea = Service;
Editable = false;
}
field("Contact Name"; Rec."Contact Name")
{
ApplicationArea = Service;
Editable = false;
}
field(SellToPhoneNo; SellToContact."Phone No.")
{
ApplicationArea = Service;
Caption = 'Phone No.';
Importance = Additional;
Editable = false;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the telephone number of the contact person at the customer company.';
}
field(SellToMobilePhoneNo; SellToContact."Mobile Phone No.")
{
ApplicationArea = Service;
Caption = 'Mobile Phone No.';
Importance = Additional;
Editable = false;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the mobile telephone number of the contact person at the customer company.';
}
field(SellToEmail; SellToContact."E-Mail")
{
ApplicationArea = Service;
Caption = 'Email';
Importance = Additional;
Editable = false;
ExtendedDatatype = EMail;
ToolTip = 'Specifies the email address of the contact person at the customer company.';
}
}
field("Phone No."; Rec."Phone No.")
{
ApplicationArea = Service;
Editable = false;
}
field("Phone No. 2"; Rec."Phone No. 2")
{
ApplicationArea = Service;
Editable = false;
}
field("E-Mail"; Rec."E-Mail")
{
ApplicationArea = Service;
Editable = false;
ExtendedDatatype = EMail;
}
field("Notify Customer"; Rec."Notify Customer")
{
ApplicationArea = Service;
Editable = false;
}
field("Service Order Type"; Rec."Service Order Type")
{
ApplicationArea = Service;
Editable = false;
}
field("Contract No."; Rec."Contract No.")
{
ApplicationArea = Service;
Editable = false;
}
field("Response Date"; Rec."Response Date")
{
ApplicationArea = Service;
Editable = false;
}
field("Response Time"; Rec."Response Time")
{
ApplicationArea = Service;
Editable = false;
}
field(Priority; Rec.Priority)
{
ApplicationArea = Service;
Editable = false;
}
field("Quote No."; Rec."Quote No.")
{
ApplicationArea = Service;
Editable = false;
}
field("Order No."; Rec."Order No.")
{
ApplicationArea = Service;
Editable = false;
}
field("External Document No."; Rec."External Document No.")
{
ApplicationArea = Service;
Editable = false;
Importance = Additional;
}
field("Responsibility Center"; Rec."Responsibility Center")
{
ApplicationArea = Service;
Editable = false;
}
field("No. Printed"; Rec."No. Printed")
{
ApplicationArea = Service;
Editable = false;
}
group("Work Description")
{
Caption = 'Work Description';
field(GetWorkDescription; Rec.GetWorkDescription())
{
ApplicationArea = Service;
Editable = false;
Importance = Additional;
MultiLine = true;
ShowCaption = false;
ToolTip = 'Specifies the products or services being offered.';
}
}
}
part(ServShipmentItemLines; "Posted Service Shpt. Subform")
{
ApplicationArea = Service;
SubPageLink = "No." = field("No.");
}
group(Invoicing)
{
Caption = 'Invoicing';
field("Bill-to Customer No."; Rec."Bill-to Customer No.")
{
ApplicationArea = Service;
Editable = false;
Importance = Promoted;
}
group("Bill-to")
{
Caption = 'Bill-to';
field("Bill-to Name"; Rec."Bill-to Name")
{
ApplicationArea = Service;
Caption = ' Name';
Editable = false;
}
field("Bill-to Name 2"; Rec."Bill-to Name 2")
{
ApplicationArea = Service;
Caption = 'Name 2';
Editable = false;
Visible = false;
}
field("Bill-to Address"; Rec."Bill-to Address")
{
ApplicationArea = Service;
Caption = 'Address';
Editable = false;
}
field("Bill-to Address 2"; Rec."Bill-to Address 2")
{
ApplicationArea = Service;
Caption = 'Address 2';
Editable = false;
}
field("Bill-to City"; Rec."Bill-to City")
{
ApplicationArea = Service;
Caption = 'City';
Editable = false;
}
group(Control21)
{
ShowCaption = false;
Visible = IsBillToCountyVisible;
field("Bill-to County"; Rec."Bill-to County")
{
ApplicationArea = Service;
CaptionClass = '5,1,' + Rec."Bill-to Country/Region Code";
Editable = false;
}
}
field("Bill-to Post Code"; Rec."Bill-to Post Code")
{
ApplicationArea = Service;
Caption = 'Post Code';
Editable = false;
}
field("Bill-to Country/Region Code"; Rec."Bill-to Country/Region Code")
{
ApplicationArea = Service;
Caption = 'Country/Region';
Editable = false;
}
field("Bill-to Contact"; Rec."Bill-to Contact")
{
ApplicationArea = Service;
Caption = 'Contact';
Editable = false;
}
field(BillToContactPhoneNo; BillToContact."Phone No.")
{
ApplicationArea = Service;
Caption = 'Phone No.';
Editable = false;
Importance = Additional;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the telephone number of the contact person at the customer''s billing address.';
}
field(BillToContactMobilePhoneNo; BillToContact."Mobile Phone No.")
{
ApplicationArea = Service;
Caption = 'Mobile Phone No.';
Editable = false;
Importance = Additional;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the mobile telephone number of the contact person at the customer''s billing address.';
}
field(BillToContactEmail; BillToContact."E-Mail")
{
ApplicationArea = Service;
Caption = 'Email';
Editable = false;
Importance = Additional;
ExtendedDatatype = EMail;
ToolTip = 'Specifies the email address of the contact person at the customer''s billing address.';
}
}
field("Your Reference"; Rec."Your Reference")
{
ApplicationArea = Service;
Editable = false;
}
field("Salesperson Code"; Rec."Salesperson Code")
{
ApplicationArea = Service;
Editable = false;
}
field("Posting Date"; Rec."Posting Date")
{
ApplicationArea = Service;
Editable = false;
Importance = Promoted;
}
field("Document Date"; Rec."Document Date")
{
ApplicationArea = Service;
Editable = false;
}
field("Shortcut Dimension 1 Code"; Rec."Shortcut Dimension 1 Code")
{
ApplicationArea = Dimensions;
Editable = false;
}
field("Shortcut Dimension 2 Code"; Rec."Shortcut Dimension 2 Code")
{
ApplicationArea = Dimensions;
Editable = false;
}
}
group(Shipping)
{
Caption = 'Shipping';
field("Ship-to Code"; Rec."Ship-to Code")
{
ApplicationArea = Service;
Editable = false;
Importance = Promoted;
}
group("Ship-to")
{
Caption = 'Ship-to';
field("Ship-to Name"; Rec."Ship-to Name")
{
ApplicationArea = Service;
Caption = 'Name';
Editable = false;
}
field("Ship-to Name 2"; Rec."Ship-to Name 2")
{
ApplicationArea = Service;
Caption = 'Name 2';
Editable = false;
Importance = Additional;
Visible = false;
}
field("Ship-to Address"; Rec."Ship-to Address")
{
ApplicationArea = Service;
Caption = 'Address';
Editable = false;
}
field("Ship-to Address 2"; Rec."Ship-to Address 2")
{
ApplicationArea = Service;
Caption = 'Address 2';
Editable = false;
}
field("Ship-to City"; Rec."Ship-to City")
{
ApplicationArea = Service;
Caption = 'City';
Editable = false;
}
group(Control29)
{
ShowCaption = false;
Visible = IsShipToCountyVisible;
field("Ship-to County"; Rec."Ship-to County")
{
ApplicationArea = Service;
CaptionClass = '5,1,' + Rec."Ship-to Country/Region Code";
Editable = false;
}
}
field("Ship-to Post Code"; Rec."Ship-to Post Code")
{
ApplicationArea = Service;
Caption = 'Post Code';
Editable = false;
Importance = Promoted;
}
field("Ship-to Country/Region Code"; Rec."Ship-to Country/Region Code")
{
ApplicationArea = Service;
Caption = 'Country/Region';
Editable = false;
}
field("Ship-to Contact"; Rec."Ship-to Contact")
{
ApplicationArea = Service;
Caption = 'Contact';
Editable = false;
}
}
field("Ship-to Phone"; Rec."Ship-to Phone")
{
ApplicationArea = Service;
Editable = false;
}
field("Ship-to Phone 2"; Rec."Ship-to Phone 2")
{
ApplicationArea = Service;
Editable = false;
}
field("Ship-to E-Mail"; Rec."Ship-to E-Mail")
{
ApplicationArea = Service;
Editable = false;
}
field("Location Code"; Rec."Location Code")
{
ApplicationArea = Location;
Editable = false;
Importance = Promoted;
}
group("Shipment Method")
{
Caption = 'Shipment Method';
field("Shipment Method Code"; Rec."Shipment Method Code")
{
ApplicationArea = Service;
Caption = 'Code';
Editable = false;
ToolTip = 'Specifies the shipment method for the shipment.';
}
field("Shipping Agent Code"; Rec."Shipping Agent Code")
{
ApplicationArea = Service;
Caption = 'Agent';
Editable = false;
Importance = Additional;
ToolTip = 'Specifies which shipping agent is used to transport the items on the service document to the customer.';
}
field("Shipping Agent Service Code"; Rec."Shipping Agent Service Code")
{
ApplicationArea = Service;
Caption = 'Agent Service';
Editable = false;
Importance = Additional;
}
}
}
group(Details)
{
Caption = 'Details';
field("Warning Status"; Rec."Warning Status")
{
ApplicationArea = Service;
Editable = false;
Importance = Promoted;
}
field("Link Service to Service Item"; Rec."Link Service to Service Item")
{
ApplicationArea = Service;
Editable = false;
}
field("Allocated Hours"; Rec."Allocated Hours")
{
ApplicationArea = Service;
Editable = false;
}
field("Service Zone Code"; Rec."Service Zone Code")
{
ApplicationArea = Service;
Editable = false;
}
field("Order Date"; Rec."Order Date")
{
ApplicationArea = Service;
Editable = false;
Importance = Promoted;
}
field("Order Time"; Rec."Order Time")
{
ApplicationArea = Service;
Editable = false;
}
field("Expected Finishing Date"; Rec."Expected Finishing Date")
{
ApplicationArea = Service;
Editable = false;
}
field("Starting Date"; Rec."Starting Date")
{
ApplicationArea = Service;
Editable = false;
}
field("Starting Time"; Rec."Starting Time")
{
ApplicationArea = Service;
Editable = false;
}
field("Actual Response Time (Hours)"; Rec."Actual Response Time (Hours)")
{
ApplicationArea = Service;
Editable = false;
ToolTip = 'Specifies the hours since the creation of the service order, to the time when the order status was changed from Pending to In Process.';
}
field("Finishing Date"; Rec."Finishing Date")
{
ApplicationArea = Service;
Editable = false;
}
field("Finishing Time"; Rec."Finishing Time")
{
ApplicationArea = Service;
Editable = false;
}
field("Service Time (Hours)"; Rec."Service Time (Hours)")
{
ApplicationArea = Service;
Editable = false;
ToolTip = 'Specifies the total time in hours that the service on the service order has taken.';
}
}
group("Foreign Trade")
{
Caption = 'Foreign Trade';
field("Currency Code"; Rec."Currency Code")
{
ApplicationArea = Service;
Editable = false;
}
field("EU 3-Party Trade"; Rec."EU 3-Party Trade")
{
ApplicationArea = Service;
Editable = false;
}
}
}
area(factboxes)
{
systempart(Control1900383207; Links)
{
ApplicationArea = RecordLinks;
Visible = false;
}
systempart(Control1905767507; Notes)
{
ApplicationArea = Notes;
Visible = true;
}
}
}
actions
{
area(navigation)
{
group("&Shipment")
{
Caption = '&Shipment';
Image = Shipment;
action("Service Ledger E&ntries")
{
ApplicationArea = Service;
Caption = 'Service Ledger E&ntries';
Image = ServiceLedger;
RunObject = Page "Service Ledger Entries";
RunPageLink = "Document Type" = const(Shipment),
"Document No." = field("No.");
ShortCutKey = 'Ctrl+F7';
ToolTip = 'View all the ledger entries for the service item or service order that result from posting transactions in service documents.';
}
action("&Warranty Ledger Entries")
{
ApplicationArea = Service;
Caption = '&Warranty Ledger Entries';
Image = WarrantyLedger;
RunObject = Page "Warranty Ledger Entries";
RunPageLink = "Document No." = field("No.");
RunPageView = sorting("Document No.", "Posting Date");
ToolTip = 'View all the ledger entries for the service item or service order that result from posting transactions in service documents that contain warranty agreements.';
}
action("&Job Ledger Entries")
{
ApplicationArea = Jobs;
Caption = '&Project Ledger Entries';
Image = JobLedger;
RunObject = Page "Job Ledger Entries";
RunPageLink = "Document No." = field("No.");
ToolTip = 'View all the project ledger entries that result from posting transactions in the service document that involve a project.';
}
action("&Allocations")
{
ApplicationArea = Service;
Caption = '&Allocations';
Image = Allocations;
RunObject = Page "Service Order Allocations";
RunPageLink = "Document Type" = const(Order),
"Document No." = field("Order No.");
RunPageView = sorting(Status, "Document Type", "Document No.", "Service Item Line No.", "Allocation Date", "Starting Time", Posted);
ToolTip = 'View allocation of resources, such as technicians, to service items in service orders.';
}
#if not CLEAN27
action("S&tatistics")
{
ApplicationArea = Service;
Caption = 'S&tatistics';
Image = Statistics;
ShortCutKey = 'F7';
ToolTip = 'View information about the physical contents of the shipment, such as quantity of the shipped items, resource hours or costs, and weight and volume of the shipped items.';
ObsoleteReason = 'The statistics action will be replaced with the ServiceStatistics action. The new action uses RunObject and does not run the action trigger. Use a page extension to modify the behaviour.';
ObsoleteState = Pending;
ObsoleteTag = '27.0';
trigger OnAction()
begin
Rec.OpenStatistics();
end;
}
#endif
action("ServiceS&tatistics")
{
ApplicationArea = Service;
Caption = 'S&tatistics';
Image = Statistics;
ShortCutKey = 'F7';
ToolTip = 'View information about the physical contents of the shipment, such as quantity of the shipped items, resource hours or costs, and weight and volume of the shipped items.';
#if CLEAN27
Visible = true;
#else
Visible = false;
#endif
RunObject = Page "Service Shipment Statistics";
RunPageOnRec = true;
}
action("Co&mments")
{
ApplicationArea = Comments;
Caption = 'Co&mments';
Image = ViewComments;
RunObject = Page "Service Comment Sheet";
RunPageLink = "No." = field("No."),
"Table Name" = const("Service Shipment Header"),
Type = const(General);
ToolTip = 'View or add comments for the record.';
}
action(Dimensions)
{
AccessByPermission = TableData Dimension = R;
ApplicationArea = Dimensions;
Caption = 'Dimensions';
Image = Dimensions;
ShortCutKey = 'Alt+D';
ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to sales and purchase documents to distribute costs and analyze transaction history.';
trigger OnAction()
begin
Rec.ShowDimensions();
CurrPage.SaveRecord();
end;
}
action("Service Document Lo&g")
{
ApplicationArea = Service;
Caption = 'Service Document Lo&g';
Image = Log;
ToolTip = 'View a list of the service document changes that have been logged. The program creates entries in the window when, for example, the response time or service order status changed, a resource was allocated, a service order was shipped or invoiced, and so on. Each line in this window identifies the event that occurred to the service document. The line contains the information about the field that was changed, its old and new value, the date and time when the change took place, and the ID of the user who actually made the changes.';
trigger OnAction()
var
TempServDocLog: Record "Service Document Log" temporary;
begin
TempServDocLog.Reset();
TempServDocLog.DeleteAll();
TempServDocLog.CopyServLog(TempServDocLog."Document Type"::Shipment.AsInteger(), Rec."No.");
TempServDocLog.CopyServLog(TempServDocLog."Document Type"::Order.AsInteger(), Rec."Order No.");
TempServDocLog.Reset();
TempServDocLog.SetCurrentKey("Change Date", "Change Time");
TempServDocLog.Ascending(false);
PAGE.Run(0, TempServDocLog);
end;
}
action("Service Email &Queue")
{
ApplicationArea = Service;
Caption = 'Service Email &Queue';
Image = Email;
RunObject = Page "Service Email Queue";
RunPageLink = "Document Type" = const("Service Order"),
"Document No." = field("Order No.");
RunPageView = sorting("Document Type", "Document No.");
ToolTip = 'View the emails that are waiting to be sent to notify customers that their service item is ready.';
}
action(CertificateOfSupplyDetails)
{
ApplicationArea = Service;
Caption = 'Certificate of Supply Details';
Image = Certificate;
RunObject = Page "Certificates of Supply";
RunPageLink = "Document Type" = filter("Service Shipment"),
"Document No." = field("No.");
ToolTip = 'View the certificate of supply that you must send to your customer for signature as confirmation of receipt. You must print a certificate of supply if the shipment uses a combination of VAT business posting group and VAT product posting group that have been marked to require a certificate of supply in the VAT Posting Setup window.';
}
action(PrintCertificateofSupply)
{
ApplicationArea = Service;
Caption = 'Print Certificate of Supply';
Image = PrintReport;
ToolTip = 'Print the certificate of supply that you must send to your customer for signature as confirmation of receipt.';
trigger OnAction()
var
CertificateOfSupply: Record "Certificate of Supply";
begin
CertificateOfSupply.SetRange("Document Type", CertificateOfSupply."Document Type"::"Service Shipment");
CertificateOfSupply.SetRange("Document No.", Rec."No.");
CertificateOfSupply.Print();
end;
}
}
}
area(processing)
{
action("&Print")
{
ApplicationArea = Service;
Caption = '&Print';
Ellipsis = true;
Image = Print;
ToolTip = 'Prepare to print the document. A report request window for the document opens where you can specify what to include on the print-out.';
trigger OnAction()
begin
ServShptHeader := Rec;
CurrPage.SetSelectionFilter(ServShptHeader);
ServShptHeader.PrintRecords(true);
end;
}
action("&Navigate")
{
ApplicationArea = Service;
Caption = 'Find entries...';
Image = Navigate;
ShortCutKey = 'Ctrl+Alt+Q';
ToolTip = 'Find entries and documents that exist for the document number and posting date on the selected document. (Formerly this action was named Navigate.)';
trigger OnAction()
begin
Rec.Navigate();
end;
}
action("Update Document")
{
ApplicationArea = Service;
Caption = 'Update Document';
Image = Edit;
ToolTip = 'Add new information that is relevant to the document. You can only edit a few fields because the document has already been posted.';
trigger OnAction()
var
PostedServiceShptUpdate: Page "Posted Service Ship. - Update";
begin
PostedServiceShptUpdate.LookupMode := true;
PostedServiceShptUpdate.SetRec(Rec);
PostedServiceShptUpdate.RunModal();
end;
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process';
actionref("Update Document_Promoted"; "Update Document")
{
}
actionref("&Print_Promoted"; "&Print")
{
}
actionref("&Navigate_Promoted"; "&Navigate")
{
}
}
group(Category_Shipment)
{
Caption = 'Shipment';
actionref(Dimensions_Promoted; Dimensions)
{
}
#if not CLEAN27
actionref("S&tatistics_Promoted"; "S&tatistics")
{
ObsoleteReason = 'The statistics action will be replaced with the ServiceStatistics action. The new action uses RunObject and does not run the action trigger. Use a page extension to modify the behaviour.';
ObsoleteState = Pending;
ObsoleteTag = '27.0';
}
#else
actionref("ServiceStatistics_Promoted"; "ServiceS&tatistics")
{
}
#endif
actionref("Co&mments_Promoted"; "Co&mments")
{
}
actionref("Service Document Lo&g_Promoted"; "Service Document Lo&g")
{
}
}
group("Category_Certificate of Supply")
{
Caption = 'Certificate of Supply';
actionref(PrintCertificateofSupply_Promoted; PrintCertificateofSupply)
{
}
actionref(CertificateOfSupplyDetails_Promoted; CertificateOfSupplyDetails)
{
}
}
}
}
trigger OnFindRecord(Which: Text): Boolean
begin
if Rec.Find(Which) then
exit(true);
Rec.SetRange("No.");
exit(Rec.Find(Which));
end;
trigger OnModifyRecord(): Boolean
begin
CODEUNIT.Run(CODEUNIT::"Service Shipment Header - Edit", Rec);
exit(false);
end;
trigger OnAfterGetRecord()
begin
SellToContact.GetOrClear(Rec."Contact No.");
BillToContact.GetOrClear(Rec."Bill-to Contact No.");
end;
trigger OnOpenPage()
begin
Rec.SetSecurityFilterOnRespCenter();
ActivateFields();
end;
var
ServShptHeader: Record "Service Shipment Header";
SellToContact: Record Contact;
BillToContact: Record Contact;
FormatAddress: Codeunit "Format Address";
IsSellToCountyVisible: Boolean;
IsShipToCountyVisible: Boolean;
IsBillToCountyVisible: Boolean;
local procedure ActivateFields()
begin
IsSellToCountyVisible := FormatAddress.UseCounty(Rec."Country/Region Code");
IsShipToCountyVisible := FormatAddress.UseCounty(Rec."Ship-to Country/Region Code");
IsBillToCountyVisible := FormatAddress.UseCounty(Rec."Bill-to Country/Region Code");
end;
}