Table 5075 Logged Segment
- App
- Base Application
- Namespace
- Microsoft.CRM.Segment
- Versions
- 17-28
Fields, 8Keys, 2Procedures, 2Events, 1
Versions171819202122232425262728
Source29
Source in 29
src/Layers/W1/BaseApp/CRM/Segment/LoggedSegment.Table.al156 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.CRM.Segment;
using Microsoft.CRM.Campaign;
using Microsoft.CRM.Interaction;
using System.Security.AccessControl;
table 5075 "Logged Segment"
{
Caption = 'Logged Segment';
DataClassification = CustomerContent;
LookupPageID = "Logged Segments";
ReplicateData = true;
fields
{
field(1; "Entry No."; Integer)
{
Caption = 'Entry No.';
ToolTip = 'Specifies the number of the entry, as assigned from the specified number series when the entry was created.';
}
field(2; "Segment No."; Code[20])
{
Caption = 'Segment No.';
ToolTip = 'Specifies the number of the segment to which the logged segment is linked. The program fills in this field by copying the contents of the No. field in the Segment window.';
}
field(3; Description; Text[100])
{
Caption = 'Description';
ToolTip = 'Specifies the description of the interaction.';
}
field(4; "No. of Interactions"; Integer)
{
CalcFormula = count("Interaction Log Entry" where("Logged Segment Entry No." = field("Entry No."),
Canceled = field(Canceled)));
Caption = 'No. of Interactions';
ToolTip = 'Specifies the number of interactions recorded for the logged segment. To see a list of the created interactions, click the field.';
Editable = false;
FieldClass = FlowField;
}
field(5; "No. of Campaign Entries"; Integer)
{
CalcFormula = count("Campaign Entry" where("Register No." = field("Entry No."),
Canceled = field(Canceled)));
Caption = 'No. of Campaign Entries';
ToolTip = 'Specifies the number of campaign entries that were recorded when you logged the segment. To see a list of the recorded campaign entries, click the field.';
Editable = false;
FieldClass = FlowField;
}
field(6; "Creation Date"; Date)
{
Caption = 'Creation Date';
ToolTip = 'Specifies the date on which the segment was logged.';
}
field(7; "User ID"; Code[50])
{
Caption = 'User ID';
ToolTip = 'Specifies the ID of the user who created or logged the interaction and segment. The program automatically fills in this field when the segment is logged.';
DataClassification = EndUserIdentifiableInformation;
TableRelation = User."User Name";
}
field(8; Canceled; Boolean)
{
Caption = 'Canceled';
ToolTip = 'Specifies that the interaction has been canceled.';
}
}
keys
{
key(Key1; "Entry No.")
{
Clustered = true;
}
key(Key2; "Segment No.")
{
}
}
fieldgroups
{
fieldgroup(DropDown; "Entry No.", Description, "Segment No.", "Creation Date")
{
}
}
var
#pragma warning disable AA0074
#pragma warning disable AA0470
Text000: Label '%1 %2 is marked %3.\Do you wish to remove the checkmark?';
Text002: Label 'Do you wish to mark %1 %2 as %3?';
Text005: Label 'Do you wish to remove the checkmark from the selected %1 lines?';
Text006: Label 'Do you wish to mark the selected %1 lines as %2? ';
#pragma warning restore AA0470
#pragma warning restore AA0074
procedure ToggleCanceledCheckmark()
var
MasterCanceledCheckmark: Boolean;
IsHandled: Boolean;
begin
OnBeforeToggleCanceledCheckmark(Rec, IsHandled);
if IsHandled then
exit;
if Find('-') then
if ConfirmToggleCanceledCheckmark(Count) then begin
MasterCanceledCheckmark := not Canceled;
repeat
SetCanceledCheckmark(MasterCanceledCheckmark);
until Next() = 0
end;
end;
procedure SetCanceledCheckmark(CanceledCheckmark: Boolean)
var
InteractLogEntry: Record "Interaction Log Entry";
CampaignEntry: Record "Campaign Entry";
begin
Canceled := CanceledCheckmark;
Modify();
CampaignEntry.SetCurrentKey("Register No.");
CampaignEntry.SetRange("Register No.", "Entry No.");
CampaignEntry.ModifyAll(Canceled, Canceled);
InteractLogEntry.SetCurrentKey("Logged Segment Entry No.");
InteractLogEntry.SetRange("Logged Segment Entry No.", "Entry No.");
InteractLogEntry.ModifyAll(Canceled, Canceled);
end;
local procedure ConfirmToggleCanceledCheckmark(NumberOfSelectedLines: Integer): Boolean
begin
if NumberOfSelectedLines = 1 then begin
if Canceled then
exit(Confirm(Text000, true, TableCaption(), "Entry No.", FieldCaption(Canceled)));
exit(Confirm(Text002, true, TableCaption(), "Entry No.", FieldCaption(Canceled)));
end;
if Canceled then
exit(Confirm(Text005, true, TableCaption));
exit(Confirm(Text006, true, TableCaption(), FieldCaption(Canceled)));
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeToggleCanceledCheckmark(var LoggedSegment: Record "Logged Segment"; var IsHandled: Boolean)
begin
end;
}