I am trying to set a custom value on the member item when the member is created for the first time.
But when I call the save method on the member the custom property value does not appear in Umbraco CMS but debugging the code I can see the custom properties have their value set in after the setValue method.
Any ideas why this is not presenting or saving in Umbraco 8 CMS?
There are no errors thrown.
private void MemberService_Saving(IMemberService sender, SaveEventArgs<IMember> e)
{
foreach (IMember member in e.SavedEntities)
{
if (member.Id <= 0)
{
var guidId = Guid.NewGuid().ToString();
member.SetValue("customFieldName", guidId);
sender.Save(member, false);
}
}
}
Member Saving Event Set Custom Properties
I am trying to set a custom value on the member item when the member is created for the first time.
But when I call the save method on the member the custom property value does not appear in Umbraco CMS but debugging the code I can see the custom properties have their value set in after the setValue method. Any ideas why this is not presenting or saving in Umbraco 8 CMS? There are no errors thrown.
Hi David
Did you solve this issue?
What is the problem?
Thanks,
Alex
is working on a reply...