-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
Apps/W1/Shopify/app/src/Logs/Codeunits/ShpfySkippedRecord.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
namespace Microsoft.Integration.Shopify; | ||
|
||
/// <summary> | ||
/// Codeunit Shpfy Skip Record (ID 30313). | ||
/// </summary> | ||
codeunit 30313 "Shpfy Skipped Record" | ||
Check failure on line 6 in Apps/W1/Shopify/app/src/Logs/Codeunits/ShpfySkippedRecord.Codeunit.al
|
||
{ | ||
Access = Internal; | ||
Permissions = tabledata "Shpfy Skipped Record" = rimd; | ||
|
||
/// <summary> | ||
/// Creates log entry for skipped record. | ||
/// </summary> | ||
/// <param name="ShopifyId">Related Shopify Id of the record.</param> | ||
/// <param name="TableId">Table Id of the record.</param> | ||
/// <param name="RecordId">Record Id of the record.</param> | ||
/// <param name="SkippedReason">Reason for skipping the record.</param> | ||
/// <param name="Shop">Shop record.</param> | ||
internal procedure LogSkippedRecord(ShopifyId: BigInteger; RecordId: RecordID; SkippedReason: Text[250]; Shop: Record "Shpfy Shop") | ||
var | ||
SkippedRecord: Record "Shpfy Skipped Record"; | ||
begin | ||
if Shop."Logging Mode" = Enum::"Shpfy Logging Mode"::Disabled then | ||
exit; | ||
SkippedRecord.Init(); | ||
SkippedRecord.Validate("Shopify Id", ShopifyId); | ||
SkippedRecord.Validate("Table ID", RecordId.TableNo()); | ||
SkippedRecord.Validate("Record ID", RecordId); | ||
SkippedRecord.Validate("Skipped Reason", SkippedReason); | ||
SkippedRecord.Insert(true); | ||
end; | ||
|
||
/// <summary> | ||
/// Creates log entry for skipped recordwith empty Shopify Id. | ||
/// </summary> | ||
/// <param name="RecordId">Record Id of the record.</param> | ||
/// <param name="SkippedReason">Reason for skipping the record.</param> | ||
/// <param name="Shop">Shop record.</param> | ||
internal procedure LogSkippedRecord(RecordId: RecordID; SkippedReason: Text[250]; Shop: Record "Shpfy Shop") | ||
begin | ||
LogSkippedRecord(0, RecordId, SkippedReason, Shop); | ||
end; | ||
|
||
} |