Skip to content

Instantly share code, notes, and snippets.

string identifier = "some.contact@identifier.com";
var updateMethod = (contact) =>
{
IContactPersonalInfo personal =
contact.GetFacet<IContactPersonalInfo>("Personal");
personal.FirstName = "John";
personal.Surname = "Doe";
};
void UpdateContact(string identifier, Action<Contact> updateMethod)
{
var contactRepository = (ContactRepositoryBase)Factory.CreateObject("contactRepository", true);
var sharedSessionManager = (SharedSessionStateManager)Factory.CreateObject("tracking/sharedSessionState/manager", true)
if (Tracker.Current.Contact != null && identifier == Tracker.Current.Contact.Identifiers.Identifier)
{
// The current contact is the one we need to update.
updateMethod(Tracker.Current.Contact);
}
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<aggregation>
<routines>
<ExecRoutineStatementBuilder>
<mappings>
<SqlMappingEntity type="Sitecore.Analytics.Aggregation.SqlMappingEntity, Sitecore.Analytics.Sql">
<Table>Fact_FormSummary</Table>
<Routine>Add_FormSummary</Routine>
</SqlMappingEntity>
@Shedal
Shedal / Config-Enable-Disable-SC-8.2u2.csv
Last active February 1, 2019 13:45 — forked from michaellwest/Config_Enable-Disable_Sitecore_8.1_upd3.csv
The following script imports the specified Sitecore Role configuration csv and automatically enables or disables the configs.
Product Filepath Filename DefaultExtension Provider CD CM PRC CMP RPT
Platform \website\ Web.config config Enable Enable Enable Enable Enable
Platform \website\ Web.config.Oracle config Enable Enable Disable Enable Disable
Platform \website\App_Config\ Commands.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ ConnectionStrings.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ ConnectionStringsOracle.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ FieldTypes.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ Icons.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ LanguageDefinitions.config config Enable Enable Enable Enable Enable
Platform \website\App_Config\ MimeTypes.config config Enable Enable Enable Enable Enable