Skip to main content

Posts

Showing posts with the label sitecorefield

Sitecore 9 Dynamic CRM Connector: Conditionally Sync Sitecore Field (Part 6)

Sitecore 9 Dynamic CRM Connector: Conditionally Sync Sitecore Field (Part 6) Part 5:  Schedule Pipeline Batches in Sitecore 9 Dynamic CRM Connector   There can be the situation while you are syncing xDB contacts to CRM and you want to update some field on the basis of some logic. Just like the below condition where I wanted to sync to “Birthdate” when it is above 1990 otherwise, it will be blank in CRM. Apply Mapping Rules To apply mapping rules firstly create custom class “BirthdateValueMappingRule”         namespace Namespace { public class BirthdateValueMappingRule : IApplyMappingRule { public readonly int Year = 1990; public readonly string FacetName = "Personal"; public bool ShouldMappingBeApplied(object value, IMapping mapping, MappingContext context) { if (value != null && context != null) { var MappingSource = (EntityModel)context.Source; va...