Skip to content

Instantly share code, notes, and snippets.

@mhwelander
Last active August 26, 2016 12:11
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 mhwelander/c821d6a3416e1dd3a1d4f17bffcbc9f6 to your computer and use it in GitHub Desktop.
Save mhwelander/c821d6a3416e1dd3a1d4f17bffcbc9f6 to your computer and use it in GitHub Desktop.
[HttpPost]
public ActionResult SubmitForm(string jobRole)
{
if (Tracker.Current != null &&
Tracker.IsActive == true &&
Tracker.Current.Contact != null)
{
var personalFacet = Tracker.Current.Contact.GetFacet<IContactPersonalInfo>("Personal");
personalFacet.JobTitle = jobRole;
var emailFacet = Tracker.Current.Contact.GetFacet<IContactEmailAddresses>("Emails");
var newEmail = emailFacet.Entries.Create("WorkEmail");
newEmail.SmtpAddress = "testing@sitecore.net";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment