Table 5994 Service Cr.Memo Header
- App
- Base Application
- Namespace
- Microsoft.Service.History
- Versions
- 17-28
Fields, 137Keys, 6Procedures, 12Events, 6Obsolete, 2
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/Service/History/ServiceCrMemoHeader.Table.al1113 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.Bank.BankAccount;
using Microsoft.Bank.Payment;
using Microsoft.CRM.Contact;
using Microsoft.CRM.Team;
using Microsoft.Finance.Currency;
using Microsoft.Finance.Dimension;
using Microsoft.Finance.GeneralLedger.Account;
using Microsoft.Finance.GeneralLedger.Journal;
using Microsoft.Finance.GeneralLedger.Setup;
using Microsoft.Finance.SalesTax;
using Microsoft.Finance.VAT.Setup;
using Microsoft.Foundation.Address;
using Microsoft.Foundation.AuditCodes;
using Microsoft.Foundation.Navigate;
using Microsoft.Foundation.NoSeries;
using Microsoft.Foundation.PaymentTerms;
using Microsoft.Foundation.Reporting;
using Microsoft.Foundation.Shipping;
using Microsoft.Inventory.Intrastat;
using Microsoft.Inventory.Ledger;
using Microsoft.Inventory.Location;
using Microsoft.Pricing.Calculation;
using Microsoft.Projects.Resources.Resource;
using Microsoft.Sales.Customer;
using Microsoft.Sales.Pricing;
using Microsoft.Sales.Receivables;
using Microsoft.Service.Comment;
using Microsoft.Service.Contract;
using Microsoft.Service.Document;
using Microsoft.Service.Setup;
using Microsoft.Utilities;
using System.Email;
using System.Globalization;
using System.Reflection;
using System.Security.AccessControl;
using System.Security.User;
table 5994 "Service Cr.Memo Header"
{
Caption = 'Service Cr.Memo Header';
DataCaptionFields = "No.", Name;
DrillDownPageID = "Posted Service Credit Memos";
LookupPageID = "Posted Service Credit Memos";
Permissions = TableData "Service Order Allocation" = rimd;
DataClassification = CustomerContent;
fields
{
field(2; "Customer No."; Code[20])
{
Caption = 'Customer No.';
ToolTip = 'Specifies the number of the customer associated with the credit memo.';
NotBlank = true;
TableRelation = Customer;
}
field(3; "No."; Code[20])
{
Caption = 'No.';
ToolTip = 'Specifies the number of the involved entry or record, according to the specified number series.';
}
field(4; "Bill-to Customer No."; Code[20])
{
Caption = 'Bill-to Customer No.';
ToolTip = 'Specifies the number of the customer that you send or sent the invoice or credit memo to.';
NotBlank = true;
TableRelation = Customer;
}
field(5; "Bill-to Name"; Text[100])
{
Caption = 'Bill-to Name';
ToolTip = 'Specifies the name of the customer that you send or sent the invoice or credit memo to.';
}
field(6; "Bill-to Name 2"; Text[50])
{
Caption = 'Bill-to Name 2';
ToolTip = 'Specifies an additional part of the name of the customer that you send or sent credit memo to.';
}
field(7; "Bill-to Address"; Text[100])
{
Caption = 'Bill-to Address';
ToolTip = 'Specifies the address of the customer to whom you sent the credit memo.';
}
field(8; "Bill-to Address 2"; Text[50])
{
Caption = 'Bill-to Address 2';
ToolTip = 'Specifies an additional line of the address.';
}
field(9; "Bill-to City"; Text[30])
{
Caption = 'Bill-to City';
ToolTip = 'Specifies the city of the address.';
TableRelation = "Post Code".City;
ValidateTableRelation = false;
}
field(10; "Bill-to Contact"; Text[100])
{
Caption = 'Bill-to Contact';
ToolTip = 'Specifies the name of the contact person at the customer''s billing address.';
}
field(11; "Your Reference"; Text[35])
{
Caption = 'Your Reference';
ToolTip = 'Specifies the customer''s reference. The content will be printed on the related document.';
}
field(12; "Ship-to Code"; Code[10])
{
Caption = 'Ship-to Code';
ToolTip = 'Specifies a code for an alternate shipment address if you want to ship to another address than the one that has been entered automatically. This field is also used in case of drop shipment.';
TableRelation = "Ship-to Address".Code where("Customer No." = field("Customer No."));
}
field(13; "Ship-to Name"; Text[100])
{
Caption = 'Ship-to Name';
ToolTip = 'Specifies the name of the customer at the address that the items are shipped to.';
}
field(14; "Ship-to Name 2"; Text[50])
{
Caption = 'Ship-to Name 2';
ToolTip = 'Specifies an additional part of thethe name of the customer at the address that the items are shipped to.';
}
field(15; "Ship-to Address"; Text[100])
{
Caption = 'Ship-to Address';
ToolTip = 'Specifies the address that the items are shipped to.';
}
field(16; "Ship-to Address 2"; Text[50])
{
Caption = 'Ship-to Address 2';
ToolTip = 'Specifies an additional part of the ship-to address, in case it is a long address.';
}
field(17; "Ship-to City"; Text[30])
{
Caption = 'Ship-to City';
ToolTip = 'Specifies the city of the address that the items are shipped to.';
TableRelation = "Post Code".City;
ValidateTableRelation = false;
}
field(18; "Ship-to Contact"; Text[100])
{
Caption = 'Ship-to Contact';
ToolTip = 'Specifies the name of the contact person at the address that the items are shipped to.';
}
field(20; "Posting Date"; Date)
{
Caption = 'Posting Date';
ToolTip = 'Specifies the date when the credit memo was posted.';
}
field(22; "Posting Description"; Text[100])
{
Caption = 'Posting Description';
}
field(23; "Payment Terms Code"; Code[10])
{
Caption = 'Payment Terms Code';
TableRelation = "Payment Terms";
}
field(24; "Due Date"; Date)
{
Caption = 'Due Date';
}
field(25; "Payment Discount %"; Decimal)
{
AutoFormatType = 0;
Caption = 'Payment Discount %';
DecimalPlaces = 0 : 5;
MaxValue = 100;
MinValue = 0;
}
field(26; "Pmt. Discount Date"; Date)
{
Caption = 'Pmt. Discount Date';
}
field(27; "Shipment Method Code"; Code[10])
{
Caption = 'Shipment Method Code';
ToolTip = 'Specifies the shipment method for the shipment.';
TableRelation = "Shipment Method";
}
field(28; "Location Code"; Code[10])
{
Caption = 'Location Code';
ToolTip = 'Specifies the location, such as warehouse or distribution center, where the credit memo was registered.';
TableRelation = Location where("Use As In-Transit" = const(false));
}
field(29; "Shortcut Dimension 1 Code"; Code[20])
{
CaptionClass = '1,2,1';
Caption = 'Shortcut Dimension 1 Code';
ToolTip = 'Specifies the code for Shortcut Dimension 1, which is one of two global dimension codes that you set up in the General Ledger Setup window.';
TableRelation = "Dimension Value".Code where("Global Dimension No." = const(1));
}
field(30; "Shortcut Dimension 2 Code"; Code[20])
{
CaptionClass = '1,2,2';
Caption = 'Shortcut Dimension 2 Code';
ToolTip = 'Specifies the code for Shortcut Dimension 2, which is one of two global dimension codes that you set up in the General Ledger Setup window.';
TableRelation = "Dimension Value".Code where("Global Dimension No." = const(2));
}
field(31; "Customer Posting Group"; Code[20])
{
Caption = 'Customer Posting Group';
ToolTip = 'Specifies the customer''s market type to link business transactions to.';
Editable = false;
TableRelation = "Customer Posting Group";
}
field(32; "Currency Code"; Code[10])
{
Caption = 'Currency Code';
ToolTip = 'Specifies the currency code for the amounts on the credit memo.';
Editable = false;
TableRelation = Currency;
}
field(33; "Currency Factor"; Decimal)
{
AutoFormatType = 0;
Caption = 'Currency Factor';
DecimalPlaces = 0 : 15;
Editable = false;
MinValue = 0;
}
field(34; "Customer Price Group"; Code[10])
{
Caption = 'Customer Price Group';
TableRelation = "Customer Price Group";
}
field(35; "Prices Including VAT"; Boolean)
{
Caption = 'Prices Including VAT';
}
field(37; "Invoice Disc. Code"; Code[20])
{
Caption = 'Invoice Disc. Code';
}
field(40; "Customer Disc. Group"; Code[20])
{
Caption = 'Customer Disc. Group';
TableRelation = "Customer Discount Group";
}
field(41; "Language Code"; Code[10])
{
Caption = 'Language Code';
TableRelation = Language;
}
field(42; "Format Region"; Text[80])
{
Caption = 'Format Region';
TableRelation = "Language Selection"."Language Tag";
}
field(43; "Salesperson Code"; Code[20])
{
Caption = 'Salesperson Code';
ToolTip = 'Specifies the code of the salesperson associated with the credit memo.';
TableRelation = "Salesperson/Purchaser";
}
field(46; Comment; Boolean)
{
CalcFormula = exist("Service Comment Line" where("Table Name" = const("Service Cr.Memo Header"),
"No." = field("No."),
Type = const(General)));
Caption = 'Comment';
Editable = false;
FieldClass = FlowField;
}
field(47; "No. Printed"; Integer)
{
Caption = 'No. Printed';
ToolTip = 'Specifies how many times the document has been printed.';
Editable = false;
}
field(52; "Applies-to Doc. Type"; Enum "Gen. Journal Document Type")
{
Caption = 'Applies-to Doc. Type';
}
field(53; "Applies-to Doc. No."; Code[20])
{
Caption = 'Applies-to Doc. No.';
trigger OnLookup()
begin
CustLedgEntry.SetCurrentKey("Document Type");
CustLedgEntry.SetRange("Document Type", "Applies-to Doc. Type");
CustLedgEntry.SetRange("Document No.", "Applies-to Doc. No.");
OnLookupAppliestoDocNoOnAfterSetFilters(Rec, CustLedgEntry);
PAGE.Run(0, CustLedgEntry);
end;
}
field(55; "Bal. Account No."; Code[20])
{
Caption = 'Bal. Account No.';
TableRelation = if ("Bal. Account Type" = const("G/L Account")) "G/L Account"
else
if ("Bal. Account Type" = const("Bank Account")) "Bank Account";
}
field(60; Amount; Decimal)
{
AutoFormatExpression = Rec."Currency Code";
AutoFormatType = 1;
CalcFormula = sum("Service Cr.Memo Line".Amount where("Document No." = field("No.")));
Caption = 'Amount';
ToolTip = 'Specifies the total credit memo amount excluding VAT.';
Editable = false;
FieldClass = FlowField;
}
field(61; "Amount Including VAT"; Decimal)
{
AutoFormatExpression = Rec."Currency Code";
AutoFormatType = 1;
CalcFormula = sum("Service Cr.Memo Line"."Amount Including VAT" where("Document No." = field("No.")));
Caption = 'Amount Including VAT';
ToolTip = 'Specifies the total credit memo amount including VAT.';
Editable = false;
FieldClass = FlowField;
}
field(70; "VAT Registration No."; Text[20])
{
Caption = 'VAT Registration No.';
}
field(73; "Reason Code"; Code[10])
{
Caption = 'Reason Code';
TableRelation = "Reason Code";
}
field(74; "Gen. Bus. Posting Group"; Code[20])
{
Caption = 'Gen. Bus. Posting Group';
TableRelation = "Gen. Business Posting Group";
}
field(75; "EU 3-Party Trade"; Boolean)
{
Caption = 'EU 3-Party Trade';
ToolTip = 'Specifies if the transaction is related to trade with a third party within the EU.';
}
field(76; "Transaction Type"; Code[10])
{
Caption = 'Transaction Type';
TableRelation = "Transaction Type";
}
field(77; "Transport Method"; Code[10])
{
Caption = 'Transport Method';
TableRelation = "Transport Method";
}
field(78; "VAT Country/Region Code"; Code[10])
{
Caption = 'VAT Country/Region Code';
TableRelation = "Country/Region";
}
field(79; Name; Text[100])
{
Caption = 'Name';
ToolTip = 'Specifies the name of the customer to whom you shipped the service on the credit memo.';
}
field(80; "Name 2"; Text[50])
{
Caption = 'Name 2';
ToolTip = 'Specifies an additional part of the name of the customer on the service invoice.';
}
field(81; Address; Text[100])
{
Caption = 'Address';
ToolTip = 'Specifies the address of the customer on the credit memo.';
}
field(82; "Address 2"; Text[50])
{
Caption = 'Address 2';
ToolTip = 'Specifies additional address information.';
}
field(83; City; Text[30])
{
Caption = 'City';
ToolTip = 'Specifies the city of the address.';
TableRelation = "Post Code".City;
ValidateTableRelation = false;
}
field(84; "Contact Name"; Text[100])
{
Caption = 'Contact Name';
ToolTip = 'Specifies the name of the contact person at the customer company.';
}
field(85; "Bill-to Post Code"; Code[20])
{
Caption = 'Bill-to Post Code';
ToolTip = 'Specifies the postal code of the customer''s billing address.';
TableRelation = "Post Code";
ValidateTableRelation = false;
}
field(86; "Bill-to County"; Text[30])
{
CaptionClass = '5,3,' + "Bill-to Country/Region Code";
Caption = 'Bill-to County';
ToolTip = 'Specifies the state, province or county of the address.';
}
field(87; "Bill-to Country/Region Code"; Code[10])
{
Caption = 'Bill-to Country/Region Code';
ToolTip = 'Specifies the country/region code of the customer''s billing address.';
TableRelation = "Country/Region";
}
field(88; "Post Code"; Code[20])
{
Caption = 'Post Code';
ToolTip = 'Specifies the postal code.';
TableRelation = "Post Code";
ValidateTableRelation = false;
}
field(89; County; Text[30])
{
CaptionClass = '5,1,' + "Country/Region Code";
Caption = 'County';
ToolTip = 'Specifies state, province or county.';
}
field(90; "Country/Region Code"; Code[10])
{
Caption = 'Country/Region Code';
ToolTip = 'Specifies the country/region of the address.';
TableRelation = "Country/Region";
}
field(91; "Ship-to Post Code"; Code[20])
{
Caption = 'Ship-to Post Code';
ToolTip = 'Specifies the postal code of the address that the items are shipped to.';
TableRelation = "Post Code";
ValidateTableRelation = false;
}
field(92; "Ship-to County"; Text[30])
{
CaptionClass = '5,4,' + "Ship-to Country/Region Code";
Caption = 'Ship-to County';
ToolTip = 'Specifies the state, province or county of the address that the items are shipped to.';
}
field(93; "Ship-to Country/Region Code"; Code[10])
{
Caption = 'Ship-to Country/Region Code';
ToolTip = 'Specifies the country/region in the customer''s address.';
TableRelation = "Country/Region";
}
field(94; "Bal. Account Type"; enum "Payment Balance Account Type")
{
Caption = 'Bal. Account Type';
}
field(97; "Exit Point"; Code[10])
{
Caption = 'Exit Point';
TableRelation = "Entry/Exit Point";
}
field(98; Correction; Boolean)
{
Caption = 'Correction';
}
field(99; "Document Date"; Date)
{
Caption = 'Document Date';
ToolTip = 'Specifies the date when the related document was created.';
}
#if not CLEAN28
#pragma warning disable AS0136
#endif
field(100; "External Document No."; Code[35])
#if not CLEAN28
#pragma warning restore AS0136
#endif
{
Caption = 'External Document No.';
ToolTip = 'Specifies the external document number that is entered on the service header that this line was posted from.';
}
field(101; "Area"; Code[10])
{
Caption = 'Area';
TableRelation = Area;
}
field(102; "Transaction Specification"; Code[10])
{
Caption = 'Transaction Specification';
TableRelation = "Transaction Specification";
}
field(104; "Payment Method Code"; Code[10])
{
Caption = 'Payment Method Code';
TableRelation = "Payment Method";
}
field(105; "Shipping Agent Code"; Code[10])
{
Caption = 'Shipping Agent Code';
ToolTip = 'Specifies which shipping agent is used to transport the items on the service document to the customer.';
TableRelation = "Shipping Agent";
}
field(107; "Pre-Assigned No. Series"; Code[20])
{
Caption = 'Pre-Assigned No. Series';
TableRelation = "No. Series";
}
field(108; "No. Series"; Code[20])
{
Caption = 'No. Series';
Editable = false;
TableRelation = "No. Series";
}
field(111; "Pre-Assigned No."; Code[20])
{
Caption = 'Pre-Assigned No.';
ToolTip = 'Specifies the number of the credit memo from which the posted credit memo was created.';
}
field(112; "User ID"; Code[50])
{
Caption = 'User ID';
DataClassification = EndUserIdentifiableInformation;
TableRelation = User."User Name";
}
field(113; "Source Code"; Code[10])
{
Caption = 'Source Code';
TableRelation = "Source Code";
}
field(114; "Tax Area Code"; Code[20])
{
Caption = 'Tax Area Code';
ToolTip = 'Specifies the tax area that is used to calculate and post sales tax.';
TableRelation = "Tax Area";
}
field(115; "Tax Liable"; Boolean)
{
Caption = 'Tax Liable';
ToolTip = 'Specifies that items, resources, or costs on the current credit memo line are liable to sales tax.';
}
field(116; "VAT Bus. Posting Group"; Code[20])
{
Caption = 'VAT Bus. Posting Group';
TableRelation = "VAT Business Posting Group";
}
field(119; "VAT Base Discount %"; Decimal)
{
AutoFormatType = 0;
Caption = 'VAT Base Discount %';
DecimalPlaces = 0 : 5;
MaxValue = 100;
MinValue = 0;
}
field(129; "Company Bank Account Code"; Code[20])
{
Caption = 'Company Bank Account Code';
ToolTip = 'Specifies the bank account to use for bank information when the document is printed.';
TableRelation = "Bank Account" where("Currency Code" = field("Currency Code"));
}
field(131; "VAT Reporting Date"; Date)
{
Caption = 'VAT Date';
ToolTip = 'Specifies the VAT date on the invoice.';
Editable = false;
}
field(200; "Work Description"; BLOB)
{
Caption = 'Work Description';
DataClassification = CustomerContent;
}
field(480; "Dimension Set ID"; Integer)
{
Caption = 'Dimension Set ID';
Editable = false;
TableRelation = "Dimension Set Entry";
trigger OnLookup()
begin
Rec.ShowDimensions();
end;
}
field(710; "Document Exchange Identifier"; Text[50])
{
Caption = 'Document Exchange Identifier';
}
field(711; "Document Exchange Status"; Enum "Service Document Exchange Status")
{
Caption = 'Document Exchange Status';
ToolTip = 'Specifies the status of the document if you are using a document exchange service to send it as an electronic document. The status values are reported by the document exchange service.';
}
field(712; "Doc. Exch. Original Identifier"; Text[50])
{
Caption = 'Doc. Exch. Original Identifier';
}
field(5052; "Contact No."; Code[20])
{
Caption = 'Contact No.';
TableRelation = Contact;
}
field(5053; "Bill-to Contact No."; Code[20])
{
Caption = 'Bill-to Contact No.';
TableRelation = Contact;
}
field(5700; "Responsibility Center"; Code[10])
{
Caption = 'Responsibility Center';
ToolTip = 'Specifies the code of the responsibility center, such as a distribution hub, that is associated with the involved user, company, customer, or vendor.';
TableRelation = "Responsibility Center";
}
field(5794; "Shipping Agent Service Code"; Code[10])
{
Caption = 'Shipping Agent Service Code';
ToolTip = 'Specifies which shipping agent service is used to transport the items on the service document to the customer.';
TableRelation = "Shipping Agent Services".Code where("Shipping Agent Code" = field("Shipping Agent Code"));
}
field(5902; Description; Text[100])
{
Caption = 'Description';
}
field(5904; "Service Order Type"; Code[10])
{
Caption = 'Service Order Type';
TableRelation = "Service Order Type";
}
field(5905; "Link Service to Service Item"; Boolean)
{
Caption = 'Link Service to Service Item';
}
field(5907; Priority; Option)
{
Caption = 'Priority';
Editable = false;
OptionCaption = 'Low,Medium,High';
OptionMembers = Low,Medium,High;
}
field(5911; "Allocated Hours"; Decimal)
{
AutoFormatType = 0;
CalcFormula = sum("Service Order Allocation"."Allocated Hours" where("Document Type" = const(Order),
"Document No." = field("No."),
"Resource No." = field("Resource Filter"),
Status = filter(Active | Finished),
"Resource Group No." = field("Resource Group Filter")));
Caption = 'Allocated Hours';
DecimalPlaces = 0 : 5;
Editable = false;
FieldClass = FlowField;
}
field(5915; "Phone No."; Text[30])
{
Caption = 'Phone No.';
ExtendedDatatype = PhoneNo;
}
field(5916; "E-Mail"; Text[80])
{
Caption = 'Email';
ExtendedDatatype = EMail;
trigger OnValidate()
var
MailManagement: Codeunit "Mail Management";
begin
MailManagement.ValidateEmailAddressField("E-Mail");
end;
}
field(5917; "Phone No. 2"; Text[30])
{
Caption = 'Phone No. 2';
ExtendedDatatype = PhoneNo;
}
field(5918; "Fax No."; Text[30])
{
Caption = 'Fax No.';
}
field(5921; "No. of Unallocated Items"; Integer)
{
CalcFormula = count("Service Item Line" where("Document Type" = const(Order),
"Document No." = field("No."),
"No. of Active/Finished Allocs" = const(0)));
Caption = 'No. of Unallocated Items';
Editable = false;
FieldClass = FlowField;
}
field(5923; "Order Time"; Time)
{
Caption = 'Order Time';
NotBlank = true;
}
field(5924; "Default Response Time (Hours)"; Decimal)
{
AutoFormatType = 0;
Caption = 'Default Response Time (Hours)';
DecimalPlaces = 0 : 5;
MinValue = 0;
}
field(5925; "Actual Response Time (Hours)"; Decimal)
{
AutoFormatType = 0;
Caption = 'Actual Response Time (Hours)';
DecimalPlaces = 0 : 5;
Editable = false;
MinValue = 0;
}
field(5926; "Service Time (Hours)"; Decimal)
{
AutoFormatType = 0;
Caption = 'Service Time (Hours)';
DecimalPlaces = 0 : 5;
Editable = false;
}
field(5927; "Response Date"; Date)
{
Caption = 'Response Date';
Editable = false;
}
field(5928; "Response Time"; Time)
{
Caption = 'Response Time';
Editable = false;
}
field(5929; "Starting Date"; Date)
{
Caption = 'Starting Date';
}
field(5930; "Starting Time"; Time)
{
Caption = 'Starting Time';
}
field(5931; "Finishing Date"; Date)
{
Caption = 'Finishing Date';
}
field(5932; "Finishing Time"; Time)
{
Caption = 'Finishing Time';
}
field(5933; "Contract Serv. Hours Exist"; Boolean)
{
CalcFormula = exist("Service Hour" where("Service Contract No." = field("Contract No.")));
Caption = 'Contract Serv. Hours Exist';
Editable = false;
FieldClass = FlowField;
}
field(5934; "Reallocation Needed"; Boolean)
{
CalcFormula = exist("Service Order Allocation" where(Status = const("Reallocation Needed"),
"Resource No." = field("Resource Filter"),
"Document Type" = const(Order),
"Document No." = field("No."),
"Resource Group No." = field("Resource Group Filter")));
Caption = 'Reallocation Needed';
Editable = false;
FieldClass = FlowField;
}
field(5936; "Notify Customer"; Option)
{
Caption = 'Notify Customer';
OptionCaption = 'No,By Phone 1,By Phone 2,By Fax,By Email';
OptionMembers = No,"By Phone 1","By Phone 2","By Fax","By Email";
}
field(5937; "Max. Labor Unit Price"; Decimal)
{
AutoFormatExpression = Rec."Currency Code";
AutoFormatType = 2;
BlankZero = true;
Caption = 'Max. Labor Unit Price';
}
field(5938; "Warning Status"; Option)
{
Caption = 'Warning Status';
OptionCaption = ' ,First Warning,Second Warning,Third Warning';
OptionMembers = " ","First Warning","Second Warning","Third Warning";
}
field(5939; "No. of Allocations"; Integer)
{
CalcFormula = count("Service Order Allocation" where("Document Type" = const(Order),
"Document No." = field("No."),
"Resource No." = field("Resource Filter"),
"Resource Group No." = field("Resource Group Filter"),
Status = filter(Active | Finished)));
Caption = 'No. of Allocations';
Editable = false;
FieldClass = FlowField;
}
field(5940; "Contract No."; Code[20])
{
Caption = 'Contract No.';
TableRelation = "Service Contract Header"."Contract No." where("Contract Type" = const(Contract),
"Customer No." = field("Customer No."),
"Ship-to Code" = field("Ship-to Code"),
"Bill-to Customer No." = field("Bill-to Customer No."));
}
field(5951; "Type Filter"; Option)
{
Caption = 'Type Filter';
FieldClass = FlowFilter;
OptionCaption = ' ,Resource,Item,Service Cost,Service Contract';
OptionMembers = " ",Resource,Item,"Service Cost","Service Contract";
}
field(5952; "Customer Filter"; Code[20])
{
Caption = 'Customer Filter';
FieldClass = FlowFilter;
TableRelation = Customer."No.";
}
field(5953; "Resource Filter"; Code[20])
{
Caption = 'Resource Filter';
FieldClass = FlowFilter;
TableRelation = Resource;
}
field(5954; "Contract Filter"; Code[20])
{
Caption = 'Contract Filter';
FieldClass = FlowFilter;
TableRelation = "Service Contract Header"."Contract No." where("Contract Type" = const(Contract));
}
field(5955; "Ship-to Fax No."; Text[30])
{
Caption = 'Ship-to Fax No.';
}
field(5956; "Ship-to E-Mail"; Text[80])
{
Caption = 'Ship-to Email';
ExtendedDatatype = EMail;
trigger OnValidate()
var
MailManagement: Codeunit "Mail Management";
begin
MailManagement.ValidateEmailAddressField("Ship-to E-Mail");
end;
}
field(5957; "Resource Group Filter"; Code[20])
{
Caption = 'Resource Group Filter';
FieldClass = FlowFilter;
TableRelation = "Resource Group";
}
field(5958; "Ship-to Phone"; Text[30])
{
Caption = 'Ship-to Phone';
ToolTip = 'Specifies the telephone number of the company''s shipping address.';
ExtendedDatatype = PhoneNo;
}
field(5959; "Ship-to Phone 2"; Text[30])
{
Caption = 'Ship-to Phone 2';
ExtendedDatatype = PhoneNo;
}
field(5966; "Service Zone Filter"; Code[10])
{
Caption = 'Service Zone Filter';
FieldClass = FlowFilter;
TableRelation = "Service Zone".Code;
}
field(5968; "Service Zone Code"; Code[10])
{
Caption = 'Service Zone Code';
Editable = false;
TableRelation = "Service Zone".Code;
}
field(5981; "Expected Finishing Date"; Date)
{
Caption = 'Expected Finishing Date';
}
field(7000; "Price Calculation Method"; Enum "Price Calculation Method")
{
Caption = 'Price Calculation Method';
}
field(7001; "Allow Line Disc."; Boolean)
{
Caption = 'Allow Line Disc.';
}
field(9001; "Quote No."; Code[20])
{
Caption = 'Quote No.';
}
}
keys
{
key(Key1; "No.")
{
Clustered = true;
}
key(Key2; "Customer No.")
{
}
key(Key3; "Contract No.", "Posting Date")
{
}
key(Key4; "Response Date", "Response Time", Priority)
{
}
key(Key5; Priority, "Response Date", "Response Time")
{
}
key(Key6; "Posting Date")
{
}
}
fieldgroups
{
fieldgroup(DropDown; "No.", "Customer No.", "Bill-to Customer No.", "Contract No.", "Posting Date")
{
}
}
trigger OnDelete()
begin
TestField("No. Printed");
LockTable();
ServCrMemoLine.Reset();
ServCrMemoLine.SetRange("Document No.", "No.");
ServCrMemoLine.DeleteAll();
ServCommentLine.Reset();
ServCommentLine.SetRange("Table Name", ServCommentLine."Table Name"::"Service Cr.Memo Header");
ServCommentLine.SetRange("No.", "No.");
ServCommentLine.DeleteAll();
end;
var
CustLedgEntry: Record "Cust. Ledger Entry";
ServCommentLine: Record "Service Comment Line";
ServCrMemoLine: Record "Service Cr.Memo Line";
DimMgt: Codeunit DimensionManagement;
UserSetupMgt: Codeunit "User Setup Management";
procedure Navigate()
var
NavigatePage: Page Navigate;
begin
NavigatePage.SetDoc("Posting Date", "No.");
NavigatePage.SetRec(Rec);
NavigatePage.Run();
end;
procedure SendRecords()
var
DocumentSendingProfile: Record "Document Sending Profile";
DummyReportSelections: Record "Report Selections";
ReportDistributionMgt: Codeunit "Report Distribution Management";
DocumentTypeTxt: Text[50];
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSendRecords(Rec, DocumentSendingProfile, IsHandled);
if IsHandled then
exit;
DocumentTypeTxt := ReportDistributionMgt.GetFullDocumentTypeText(Rec);
DocumentSendingProfile.SendCustomerRecords(
DummyReportSelections.Usage::"SM.Credit Memo".AsInteger(), Rec, DocumentTypeTxt, "Bill-to Customer No.", "No.",
FieldNo("Bill-to Customer No."), FieldNo("No."));
end;
procedure SendProfile(var DocumentSendingProfile: Record "Document Sending Profile")
var
DummyReportSelections: Record "Report Selections";
ReportDistributionMgt: Codeunit "Report Distribution Management";
DocumentTypeTxt: Text[50];
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSendProfile(Rec, DocumentSendingProfile, IsHandled);
if IsHandled then
exit;
DocumentTypeTxt := ReportDistributionMgt.GetFullDocumentTypeText(Rec);
DocumentSendingProfile.Send(
DummyReportSelections.Usage::"SM.Credit Memo".AsInteger(), Rec, "No.", "Bill-to Customer No.",
DocumentTypeTxt, FieldNo("Bill-to Customer No."), FieldNo("No."));
end;
procedure PrintRecords(ShowRequestForm: Boolean)
var
DocumentSendingProfile: Record "Document Sending Profile";
DummyReportSelections: Record "Report Selections";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforePrintRecords(Rec, ShowRequestForm, IsHandled);
if IsHandled then
exit;
DocumentSendingProfile.TrySendToPrinter(
DummyReportSelections.Usage::"SM.Credit Memo".AsInteger(), Rec, FieldNo("Bill-to Customer No."), ShowRequestForm);
end;
procedure LookupAdjmtValueEntries()
var
ValueEntry: Record "Value Entry";
begin
ValueEntry.SetCurrentKey("Document No.");
ValueEntry.SetRange("Document No.", "No.");
ValueEntry.SetRange("Document Type", ValueEntry."Document Type"::"Service Credit Memo");
ValueEntry.SetRange(Adjustment, true);
PAGE.RunModal(0, ValueEntry);
end;
procedure ShowDimensions()
begin
DimMgt.ShowDimensionSet("Dimension Set ID", StrSubstNo('%1 %2', TableCaption(), "No."));
end;
procedure SetSecurityFilterOnRespCenter()
var
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSetSecurityFilterOnRespCenter(Rec, IsHandled);
if IsHandled then
exit;
if UserSetupMgt.GetServiceFilter() <> '' then begin
FilterGroup(2);
SetRange("Responsibility Center", UserSetupMgt.GetServiceFilter());
FilterGroup(0);
end;
end;
#if not CLEAN27
[Obsolete('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.', '27.0')]
procedure OpenStatistics()
var
StatPageID: Integer;
begin
StatPageID := Page::"Service Credit Memo Statistics";
OnOpenStatisticsOnAfterSetStatPageID(Rec, StatPageID);
Page.RunModal(StatPageID, Rec);
end;
#endif
procedure GetDocExchStatusStyle(): Text
begin
case "Document Exchange Status" of
"Document Exchange Status"::"Not Sent":
exit('Standard');
"Document Exchange Status"::"Sent to Document Exchange Service":
exit('Ambiguous');
"Document Exchange Status"::"Delivered to Recipient":
exit('Favorable');
else
exit('Unfavorable');
end;
end;
procedure ShowActivityLog()
var
ActivityLog: Record "Activity Log";
begin
ActivityLog.ShowEntries(Rec.RecordId);
end;
procedure PrintToDocumentAttachment(var ServiceCrMemoHeader: Record "Service Cr.Memo Header")
var
ShowNotificationAction: Boolean;
begin
ShowNotificationAction := ServiceCrMemoHeader.Count() = 1;
if ServiceCrMemoHeader.FindSet() then
repeat
DoPrintToDocumentAttachment(ServiceCrMemoHeader, ShowNotificationAction);
until ServiceCrMemoHeader.Next() = 0;
end;
local procedure DoPrintToDocumentAttachment(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; ShowNotificationAction: Boolean)
var
ReportSelections: Record "Report Selections";
begin
ServiceCrMemoHeader.SetRecFilter();
ReportSelections.SaveAsDocumentAttachment(
ReportSelections.Usage::"SM.Credit Memo".AsInteger(), ServiceCrMemoHeader, ServiceCrMemoHeader."No.", ServiceCrMemoHeader."Bill-to Customer No.", ShowNotificationAction);
end;
procedure GetWorkDescription(): Text
var
TypeHelper: Codeunit "Type Helper";
InStream: InStream;
begin
CalcFields("Work Description");
"Work Description".CreateInStream(InStream, TEXTENCODING::UTF8);
exit(TypeHelper.TryReadAsTextWithSepAndFieldErrMsg(InStream, TypeHelper.LFSeparator(), FieldName("Work Description")));
end;
[IntegrationEvent(false, false)]
local procedure OnBeforePrintRecords(var ServiceCrMemoHeader: Record "Service Cr.Memo Header"; ShowRequestForm: Boolean; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSendProfile(var ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetSecurityFilterOnRespCenter(var ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSendRecords(var ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var DocumentSendingProfile: Record "Document Sending Profile"; var IsHandled: Boolean)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnLookupAppliestoDocNoOnAfterSetFilters(ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var CustLedgerEntry: Record "Cust. Ledger Entry")
begin
end;
#if not CLEAN27
[Obsolete('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.', '27.0')]
[IntegrationEvent(false, false)]
local procedure OnOpenStatisticsOnAfterSetStatPageID(var ServiceCrMemoHeader: Record "Service Cr.Memo Header"; var StatPageID: Integer);
begin
end;
#endif
}