Page 130 Posted Sales Shipment
- App
- Base Application
- Namespace
- Microsoft.Sales.History
- Versions
- 17-28
- Source table
- 110
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Sales/History/PostedSalesShipment.Page.al813 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.Sales.History;
using Microsoft.CRM.Contact;
using Microsoft.Finance.Dimension;
using Microsoft.Foundation.Address;
using Microsoft.Foundation.Attachment;
using Microsoft.Sales.Comment;
using Microsoft.Utilities;
using System.Automation;
/// <summary>
/// Displays a single posted sales shipment document with header and line details.
/// </summary>
page 130 "Posted Sales Shipment"
{
Caption = 'Posted Sales Shipment';
InsertAllowed = false;
PageType = Document;
SourceTable = "Sales Shipment Header";
layout
{
area(content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.")
{
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Promoted;
}
field("Sell-to Customer No."; Rec."Sell-to Customer No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Customer No.';
Editable = false;
Visible = false;
}
field("Sell-to Customer Name"; Rec."Sell-to Customer Name")
{
ApplicationArea = Basic, Suite;
Caption = 'Customer';
Editable = false;
}
field("Sell-to Customer Name 2"; Rec."Sell-to Customer Name 2")
{
ApplicationArea = Basic, Suite;
Caption = 'Customer Name 2';
Editable = false;
Visible = false;
}
group("Sell-to")
{
Caption = 'Sell-to';
field("Sell-to Address"; Rec."Sell-to Address")
{
ApplicationArea = Basic, Suite;
Caption = 'Address';
Editable = false;
Importance = Additional;
}
field("Sell-to Address 2"; Rec."Sell-to Address 2")
{
ApplicationArea = Basic, Suite;
Caption = 'Address 2';
Editable = false;
Importance = Additional;
}
field("Sell-to City"; Rec."Sell-to City")
{
ApplicationArea = Basic, Suite;
Caption = 'City';
Editable = false;
Importance = Additional;
}
group(Control15)
{
ShowCaption = false;
Visible = IsSellToCountyVisible;
field("Sell-to County"; Rec."Sell-to County")
{
ApplicationArea = Basic, Suite;
CaptionClass = '5,1,' + Rec."Sell-to Country/Region Code";
Editable = false;
Importance = Additional;
}
}
field("Sell-to Post Code"; Rec."Sell-to Post Code")
{
ApplicationArea = Basic, Suite;
Caption = 'Post Code';
Editable = false;
Importance = Additional;
}
field("Sell-to Country/Region Code"; Rec."Sell-to Country/Region Code")
{
ApplicationArea = Basic, Suite;
Caption = 'Country/Region';
Editable = false;
Importance = Additional;
ToolTip = 'Specifies the country/region of the customer on the sales document.';
}
field("Sell-to Contact No."; Rec."Sell-to Contact No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Contact No.';
Editable = false;
Importance = Additional;
}
field(SellToPhoneNo; SellToContact."Phone No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Phone No.';
Importance = Additional;
Editable = false;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the telephone number of the contact person at the customer''s sell-to address.';
}
field(SellToMobilePhoneNo; SellToContact."Mobile Phone No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Mobile Phone No.';
Importance = Additional;
Editable = false;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the mobile telephone number of the contact person at the customer''s sell-to address.';
}
field(SellToEmail; SellToContact."E-Mail")
{
ApplicationArea = Basic, Suite;
Caption = 'Email';
Importance = Additional;
Editable = false;
ExtendedDatatype = EMail;
ToolTip = 'Specifies the email address of the contact person at the customer''s sell-to address.';
}
}
field("Sell-to Contact"; Rec."Sell-to Contact")
{
ApplicationArea = Basic, Suite;
Caption = 'Contact';
Editable = false;
ToolTip = 'Specifies the name of the contact at the customer''s sell-to address.';
}
field("No. Printed"; Rec."No. Printed")
{
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Additional;
}
field("Posting Date"; Rec."Posting Date")
{
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Promoted;
}
field("Document Date"; Rec."Document Date")
{
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Additional;
ToolTip = 'Specifies the posting date of the document.';
}
field("Requested Delivery Date"; Rec."Requested Delivery Date")
{
ApplicationArea = Basic, Suite;
Editable = false;
}
field("Promised Delivery Date"; Rec."Promised Delivery Date")
{
ApplicationArea = OrderPromising;
Editable = false;
}
field("Quote No."; Rec."Quote No.")
{
ApplicationArea = Basic, Suite;
Editable = false;
}
field("Order No."; Rec."Order No.")
{
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Promoted;
}
field("External Document No."; Rec."External Document No.")
{
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Additional;
}
field("Salesperson Code"; Rec."Salesperson Code")
{
ApplicationArea = Suite;
Editable = false;
Importance = Additional;
}
field("Responsibility Center"; Rec."Responsibility Center")
{
ApplicationArea = Suite;
Editable = false;
Importance = Additional;
}
group("Work Description")
{
Caption = 'Work Description';
field(GetWorkDescription; Rec.GetWorkDescription())
{
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Additional;
MultiLine = true;
ShowCaption = false;
ToolTip = 'Specifies the products or services being offered.';
}
}
}
part(SalesShipmLines; "Posted Sales Shpt. Subform")
{
ApplicationArea = Basic, Suite;
SubPageLink = "Document No." = field("No.");
}
group(Shipping)
{
Caption = 'Shipping';
field("Ship-to Code"; Rec."Ship-to Code")
{
ApplicationArea = Basic, Suite;
Caption = 'Address Code';
Editable = false;
Importance = Promoted;
}
field("Ship-to Name"; Rec."Ship-to Name")
{
ApplicationArea = Basic, Suite;
Caption = 'Name';
Editable = false;
ToolTip = 'Specifies the name of the customer that you delivered the items to.';
}
field("Ship-to Name 2"; Rec."Ship-to Name 2")
{
ApplicationArea = Basic, Suite;
Caption = 'Name 2';
Editable = false;
Importance = Additional;
Visible = false;
}
field("Ship-to Address"; Rec."Ship-to Address")
{
ApplicationArea = Basic, Suite;
Caption = 'Address';
Editable = false;
}
field("Ship-to Address 2"; Rec."Ship-to Address 2")
{
ApplicationArea = Basic, Suite;
Caption = 'Address 2';
Editable = false;
}
field("Ship-to City"; Rec."Ship-to City")
{
ApplicationArea = Basic, Suite;
Caption = 'City';
Editable = false;
}
group(Control21)
{
ShowCaption = false;
Visible = IsShipToCountyVisible;
field("Ship-to County"; Rec."Ship-to County")
{
ApplicationArea = Basic, Suite;
CaptionClass = '5,1,' + Rec."Ship-to Country/Region Code";
Editable = false;
}
}
field("Ship-to Post Code"; Rec."Ship-to Post Code")
{
ApplicationArea = Basic, Suite;
Caption = 'Post Code';
Editable = false;
Importance = Promoted;
ToolTip = 'Specifies the post code of the customer''s ship-to address.';
}
field("Ship-to Country/Region Code"; Rec."Ship-to Country/Region Code")
{
ApplicationArea = Basic, Suite;
Caption = 'Country/Region';
Editable = false;
}
field("Ship-to Phone No."; Rec."Ship-to Phone No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Phone No.';
Editable = false;
}
field("Ship-to Contact"; Rec."Ship-to Contact")
{
ApplicationArea = Basic, Suite;
Caption = 'Contact';
Editable = false;
}
field("Location Code"; Rec."Location Code")
{
ApplicationArea = Location;
Editable = false;
Importance = Promoted;
ToolTip = 'Specifies the location from where inventory items to the customer on the sales document are to be shipped by default.';
}
field("Outbound Whse. Handling Time"; Rec."Outbound Whse. Handling Time")
{
ApplicationArea = Warehouse;
Editable = false;
}
field("Shipping Time"; Rec."Shipping Time")
{
ApplicationArea = Basic, Suite;
Editable = false;
}
group("Shipment Method")
{
Caption = 'Shipment Method';
field("Shipment Method Code"; Rec."Shipment Method Code")
{
ApplicationArea = Basic, Suite;
Caption = 'Code';
Editable = false;
ToolTip = 'Specifies the shipment method for the shipment.';
}
field("Shipping Agent Code"; Rec."Shipping Agent Code")
{
ApplicationArea = Suite;
Caption = 'Agent';
Editable = false;
Importance = Additional;
}
field("Shipping Agent Service Code"; Rec."Shipping Agent Service Code")
{
ApplicationArea = Suite;
Caption = 'Agent Service';
Editable = false;
Importance = Additional;
}
field("Package Tracking No."; Rec."Package Tracking No.")
{
ApplicationArea = Suite;
Editable = false;
Importance = Additional;
}
}
field("Shipment Date"; Rec."Shipment Date")
{
ApplicationArea = Basic, Suite;
Editable = false;
Importance = Promoted;
}
}
group(Billing)
{
Caption = 'Billing';
field("Bill-to Customer No."; Rec."Bill-to Customer No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Customer No.';
Editable = false;
Importance = Additional;
}
field("Bill-to Name"; Rec."Bill-to Name")
{
ApplicationArea = Basic, Suite;
Caption = 'Name';
Editable = false;
ToolTip = 'Specifies the name of the customer that you sent the invoice to.';
}
field("Bill-to Name 2"; Rec."Bill-to Name 2")
{
ApplicationArea = Basic, Suite;
Caption = 'Name 2';
Editable = false;
Importance = Additional;
Visible = false;
}
field("Bill-to Address"; Rec."Bill-to Address")
{
ApplicationArea = Basic, Suite;
Caption = 'Address';
Editable = false;
Importance = Additional;
}
field("Bill-to Address 2"; Rec."Bill-to Address 2")
{
ApplicationArea = Basic, Suite;
Caption = 'Address 2';
Editable = false;
Importance = Additional;
}
field("Bill-to City"; Rec."Bill-to City")
{
ApplicationArea = Basic, Suite;
Caption = 'City';
Editable = false;
Importance = Additional;
}
group(Control29)
{
ShowCaption = false;
Visible = IsBillToCountyVisible;
field("Bill-to County"; Rec."Bill-to County")
{
ApplicationArea = Basic, Suite;
CaptionClass = '5,1,' + Rec."Bill-to Country/Region Code";
Editable = false;
Importance = Additional;
}
}
field("Bill-to Post Code"; Rec."Bill-to Post Code")
{
ApplicationArea = Basic, Suite;
Caption = 'Post Code';
Editable = false;
Importance = Additional;
ToolTip = 'Specifies the post code of the customer''s bill-to address.';
}
field("Bill-to Country/Region Code"; Rec."Bill-to Country/Region Code")
{
ApplicationArea = Basic, Suite;
Caption = 'Country/Region Code';
Editable = false;
Importance = Additional;
}
field("Bill-to Contact No."; Rec."Bill-to Contact No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Contact No.';
Editable = false;
Importance = Additional;
}
field(BillToContactPhoneNo; BillToContact."Phone No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Phone No.';
Editable = false;
Importance = Additional;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the telephone number of the contact person at the customer''s bill-to address.';
}
field(BillToContactMobilePhoneNo; BillToContact."Mobile Phone No.")
{
ApplicationArea = Basic, Suite;
Caption = 'Mobile Phone No.';
Editable = false;
Importance = Additional;
ExtendedDatatype = PhoneNo;
ToolTip = 'Specifies the mobile telephone number of the contact person at the customer''s bill-to address.';
}
field(BillToContactEmail; BillToContact."E-Mail")
{
ApplicationArea = Basic, Suite;
Caption = 'Email';
Editable = false;
Importance = Additional;
ExtendedDatatype = EMail;
ToolTip = 'Specifies the email address of the contact at the customer''s bill-to address.';
}
field("Bill-to Contact"; Rec."Bill-to Contact")
{
ApplicationArea = Basic, Suite;
Caption = 'Contact';
Editable = false;
ToolTip = 'Specifies the name of the person you regularly contact at the customer to whom you sent the invoice.';
}
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;
}
}
}
area(factboxes)
{
systempart(Control1900383207; Links)
{
ApplicationArea = RecordLinks;
Visible = false;
}
systempart(Control1905767507; Notes)
{
ApplicationArea = Notes;
}
part("Attached Documents List"; "Doc. Attachment List Factbox")
{
ApplicationArea = All;
Caption = 'Documents';
UpdatePropagation = Both;
SubPageLink = "Table ID" = const(Database::"Sales Shipment Header"),
"No." = field("No.");
}
}
}
actions
{
area(navigation)
{
group("&Shipment")
{
Caption = '&Shipment';
Image = Shipment;
action(Statistics)
{
ApplicationArea = Suite;
Caption = 'Statistics';
Image = Statistics;
RunObject = Page "Sales Shipment Statistics";
RunPageLink = "No." = field("No.");
ShortCutKey = 'F7';
ToolTip = 'View statistical information, such as the value of posted entries, for the record.';
}
action("Co&mments")
{
ApplicationArea = Comments;
Caption = 'Co&mments';
Image = ViewComments;
RunObject = Page "Sales Comment Sheet";
RunPageLink = "Document Type" = const(Shipment),
"No." = field("No."),
"Document Line No." = const(0);
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();
end;
}
action(Approvals)
{
AccessByPermission = TableData "Posted Approval Entry" = R;
ApplicationArea = Suite;
Caption = 'Approvals';
Image = Approvals;
ToolTip = 'View a list of the records that are waiting to be approved. For example, you can see who requested the record to be approved, when it was sent, and when it is due to be approved.';
trigger OnAction()
var
ApprovalsMgmt: Codeunit "Approvals Mgmt.";
begin
ApprovalsMgmt.ShowPostedApprovalEntries(Rec.RecordId);
end;
}
action(CertificateOfSupplyDetails)
{
ApplicationArea = Basic, Suite;
Caption = 'Certificate of Supply Details';
Image = Certificate;
RunObject = Page "Certificates of Supply";
RunPageLink = "Document Type" = filter("Sales 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 = Basic, Suite;
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"::"Sales Shipment");
CertificateOfSupply.SetRange("Document No.", Rec."No.");
CertificateOfSupply.Print();
end;
}
}
}
area(processing)
{
group("F&unctions")
{
Caption = 'F&unctions';
Image = "Action";
action("&Track Package")
{
ApplicationArea = Basic, Suite;
Caption = '&Track Package';
Image = ItemTracking;
ToolTip = 'Open the shipping agent''s tracking page to track the package. ';
trigger OnAction()
begin
Rec.StartTrackingSite();
end;
}
}
action(SendCustom)
{
ApplicationArea = Basic, Suite;
Caption = 'Send';
Ellipsis = true;
Image = SendToMultiple;
ToolTip = 'Prepare to send the document according to the customer''s sending profile, such as attached to an email. The Send document to window opens first so you can confirm or select a sending profile.';
trigger OnAction()
var
SalesShipmentHeader: Record "Sales Shipment Header";
begin
SalesShipmentHeader := Rec;
CurrPage.SetSelectionFilter(SalesShipmentHeader);
SalesShipmentHeader.SendRecords();
end;
}
action("&Print")
{
ApplicationArea = Basic, Suite;
Caption = '&Print';
Ellipsis = true;
Image = Print;
ToolTip = 'Print the shipping notice.';
trigger OnAction()
begin
SalesShptHeader := Rec;
OnBeforePrintRecords(Rec, SalesShptHeader);
CurrPage.SetSelectionFilter(SalesShptHeader);
SalesShptHeader.PrintRecords(true);
end;
}
action(Email)
{
ApplicationArea = Basic, Suite;
Caption = '&Email';
Image = Email;
ToolTip = 'Prepare to email the document. The Send Email window opens prefilled with the customer''s email address so you can add or edit information.';
trigger OnAction()
begin
SalesShptHeader := Rec;
CurrPage.SetSelectionFilter(SalesShptHeader);
SalesShptHeader.EmailRecords(true);
end;
}
action(AttachAsPDF)
{
ApplicationArea = Basic, Suite;
Caption = 'Attach as PDF';
Image = PrintAttachment;
ToolTip = 'Create a PDF file and attach it to the document.';
trigger OnAction()
var
SalesShipmentHeader: Record "Sales Shipment Header";
begin
SalesShipmentHeader := Rec;
SalesShipmentHeader.SetRecFilter();
Rec.PrintToDocumentAttachment(SalesShipmentHeader);
end;
}
action("&Navigate")
{
ApplicationArea = Basic, Suite;
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 = Suite;
Caption = 'Update Document';
Image = Edit;
ToolTip = 'Add new information that is relevant to the document, such as information from the shipping agent. You can only edit a few fields because the document has already been posted.';
trigger OnAction()
var
PostedSalesShipmentUpdate: Page "Posted Sales Shipment - Update";
begin
PostedSalesShipmentUpdate.LookupMode := true;
PostedSalesShipmentUpdate.SetRec(Rec);
PostedSalesShipmentUpdate.RunModal();
end;
}
}
area(Promoted)
{
group(Category_Process)
{
Caption = 'Process', Comment = 'Generated from the PromotedActionCategories property index 1.';
actionref("Update Document_Promoted"; "Update Document")
{
}
actionref("&Print_Promoted"; "&Print")
{
}
actionref("&Navigate_Promoted"; "&Navigate")
{
}
actionref("&Track Package_Promoted"; "&Track Package")
{
}
group(Category_Category4)
{
Caption = 'Print/Send', Comment = 'Generated from the PromotedActionCategories property index 3.';
}
}
group(Category_Category6)
{
Caption = 'Print/Send', Comment = 'Generated from the PromotedActionCategories property index 5.';
actionref(Print_Promoted; "&Print")
{
}
actionref(Email_Promoted; Email)
{
}
actionref(AttachAsPDF_Promoted; AttachAsPDF)
{
}
actionref(SendCustom_Promoted; SendCustom)
{
}
}
group(Category_Category5)
{
Caption = 'Shipment', Comment = 'Generated from the PromotedActionCategories property index 4.';
actionref(Dimensions_Promoted; Dimensions)
{
}
actionref(Statistics_Promoted; Statistics)
{
}
actionref(Approvals_Promoted; Approvals)
{
}
actionref("Co&mments_Promoted"; "Co&mments")
{
}
}
group("Category_Certificate of Supply")
{
Caption = 'Certificate of Supply';
actionref(PrintCertificateofSupply_Promoted; PrintCertificateofSupply)
{
}
actionref(CertificateOfSupplyDetails_Promoted; CertificateOfSupplyDetails)
{
}
}
group(Category_Report)
{
Caption = 'Report', Comment = 'Generated from the PromotedActionCategories property index 2.';
}
}
}
trigger OnOpenPage()
begin
Rec.SetSecurityFilterOnRespCenter();
IsBillToCountyVisible := FormatAddress.UseCounty(Rec."Bill-to Country/Region Code");
IsShipToCountyVisible := FormatAddress.UseCounty(Rec."Ship-to Country/Region Code");
IsSellToCountyVisible := FormatAddress.UseCounty(Rec."Sell-to Country/Region Code");
end;
trigger OnAfterGetRecord()
begin
SellToContact.GetOrClear(Rec."Sell-to Contact No.");
BillToContact.GetOrClear(Rec."Bill-to Contact No.");
end;
var
SalesShptHeader: Record "Sales Shipment Header";
SellToContact: Record Contact;
BillToContact: Record Contact;
FormatAddress: Codeunit "Format Address";
IsBillToCountyVisible: Boolean;
IsSellToCountyVisible: Boolean;
IsShipToCountyVisible: Boolean;
[IntegrationEvent(false, false)]
local procedure OnBeforePrintRecords(SalesShptHeaderRec: Record "Sales Shipment Header"; var SalesShptHeaderToPrint: Record "Sales Shipment Header")
begin
end;
}