Skip to content

Commit

Permalink
listing page for synced contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfbluesoftcz committed Feb 6, 2024
1 parent 6617d7d commit 41ee563
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Kentico.Xperience.Admin.Base;
using Kentico.Xperience.Admin.DigitalMarketing.UIPages;
using Kentico.Xperience.CRM.Common.Admin;
using CMS.ContactManagement;

[assembly: UIPage(
parentType: typeof(ContactManagementApplication),
slug: "crm-contact-sync-listing",
uiPageType: typeof(CRMContactSyncItemListing),
name: "CRM contacts sync",
templateName: TemplateNames.LISTING,
order: 1000,
icon: Icons.IntegrationScheme)]

namespace Kentico.Xperience.CRM.Common.Admin;

internal class CRMContactSyncItemListing : ListingPage
{
protected override string ObjectType => CRMSyncItemInfo.OBJECT_TYPE;

public override Task ConfigurePage()
{
PageConfiguration.ColumnConfigurations
.AddColumn(nameof(CRMSyncItemInfo.CRMSyncItemEntityID), "Email", maxWidth: 50)
.AddColumn(nameof(CRMSyncItemInfo.CRMSyncItemEntityCRM), "CRM", maxWidth: 20)
.AddColumn(nameof(CRMSyncItemInfo.CRMSyncItemCRMID), "CRM ID")
.AddColumn(nameof(CRMSyncItemInfo.CRMSyncItemLastModified), "Last sync");

PageConfiguration.QueryModifiers.AddModifier(q =>
q.WhereEquals(nameof(CRMSyncItemInfo.CRMSyncItemEntityClass), ContactInfo.TYPEINFO.ObjectClassName)
.OrderByDescending(nameof(CRMSyncItemInfo.CRMSyncItemLastModified)));

return base.ConfigurePage();
}
}

0 comments on commit 41ee563

Please sign in to comment.