Skip to content

Instantly share code, notes, and snippets.

@DanKinsella
Created September 6, 2023 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanKinsella/d668c1577389d8b1391c610d1d15868c to your computer and use it in GitHub Desktop.
Save DanKinsella/d668c1577389d8b1391c610d1d15868c to your computer and use it in GitHub Desktop.
Coupled to Dataverse changes for Business Central 23
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