Created
September 6, 2023 10:12
-
-
Save DanKinsella/d668c1577389d8b1391c610d1d15868c to your computer and use it in GitHub Desktop.
Coupled to Dataverse changes for Business Central 23
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
tableextension 50100 "Purchase Header Ext" extends "Purchase Header" | |
{ | |
fields | |
{ | |
field(50100; "Coupled to CRM"; Boolean) | |
{ | |
DataClassification = SystemMetadata; | |
Caption = 'Coupled to Dataverse'; | |
Editable = false; | |
ObsoleteState = Pending; | |
ObsoleteTag = '23.0'; | |
} | |
field(50101; "Coupled to Dataverse"; Boolean) | |
{ | |
FieldClass = FlowField; | |
Caption = 'Coupled to Dataverse'; | |
Editable = false; | |
CalcFormula = exist("CRM Integration Record" where("Integration ID" = field(SystemId), "Table ID" = const(Database::"Purchase Header"))); | |
} | |
} | |
[Obsolete('This functionality is replaced with flow fields Coupled to Dataverse.', '23.0')] | |
procedure SetCoupledFlags() | |
var | |
CRMIntegrationRecord: Record "CRM Integration Record"; | |
CRMIntegrationManagement: Codeunit "CRM Integration Management"; | |
begin | |
CRMIntegrationRecord.SetRange("Table ID", Database::"Purchase Header"); | |
if CRMIntegrationRecord.FindSet() then | |
repeat | |
CRMIntegrationManagement.SetCoupledFlag(CRMIntegrationRecord, true); | |
until CRMIntegrationRecord.Next() = 0; | |
end; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment