forked from microsoft/ALAppExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShpfySalesInvoiceUpdate.PageExt.al
44 lines (38 loc) · 1.56 KB
/
ShpfySalesInvoiceUpdate.PageExt.al
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace Microsoft.Integration.Shopify;
using Microsoft.Sales.History;
/// <summary>
/// PageExtension Shpfy Sales Invoice Update (ID 30125) extends Record Posted Sales Inv. - Update.
/// </summary>
pageextension 30125 "Shpfy Sales Invoice Update" extends "Posted Sales Inv. - Update"
{
layout
{
addlast(content)
{
group(Shopify)
{
Caption = 'Shopify';
Visible = ShopifyTabVisible;
field("Shpfy Order Id"; Rec."Shpfy Order Id")
{
ApplicationArea = Basic, Suite;
Caption = 'Shopify Order Id';
Editable = (Rec."Shpfy Order Id" = 0) or (Rec."Shpfy Order Id" = -1) or (Rec."Shpfy Order Id" = -2);
ToolTip = 'Specifies the Shopify Order ID. Helps track the status of invoices within Shopify, with 0 indicating readiness to synchronize, -1 indicating an error, and -2 indicating that the shipment is skipped.';
trigger OnValidate()
begin
if not (Rec."Shpfy Order Id" in [0, -1, -2]) then
Error(ValueNotAllowedErr);
end;
}
}
}
}
trigger OnAfterGetRecord()
begin
ShopifyTabVisible := Rec."Shpfy Order Id" <> 0;
end;
var
ShopifyTabVisible: Boolean;
ValueNotAllowedErr: Label 'Allowed values are 0, -1 or -2. 0 indicates readiness to synchronize, -1 indicates an error, and -2 indicates that the invoice is skipped.';
}