Beispiel #1
0
        public ActionResult AccountProfile()
        {
            var         crmUser    = UserManager.FindById(User.Identity.GetUserId());
            Profile     definition = XrmProfile.GetProfile("ClickLearn Requirements");
            UserProfile profile    = XrmProfile.GetUserProfile(crmUser.ContactId, "ClickLearn Requirements");

            dynamic model = new XrmProfileModel(profile);

            return(View(model));
        }
Beispiel #2
0
        public new ActionResult AccountProfile(FormCollection form)
        {
            if (ModelState.IsValid)
            {
                var         crmUser = UserManager.FindById(User.Identity.GetUserId());
                UserProfile profile = XrmProfile.GetUserProfile(crmUser.ContactId, "ClickLearn Requirements");
                profile.Update(form);
                dynamic model = new XrmProfileModel(profile);

                XrmProfile.UpdateUserProfile(profile);
            }
            return(RedirectToAction("AccountProfile"));
        }