I am using umbraco identity which is working fine, i am trying to update member custom property using memberservice but error occurred "No PropertyType exists with the supplied alias ", i can see the member with all properties.
var ms = ApplicationContext.Current.Services.MemberService;
Umbraco.Core.Models.IMember mem = ApplicationContext.Current.Services.MemberService.GetById(user.Id);
mem.SetValue("somalias",value);<---error
No PropertyType exists with the supplied alias
Dear Experts,
I am using umbraco identity which is working fine, i am trying to update member custom property using memberservice but error occurred "No PropertyType exists with the supplied alias ", i can see the member with all properties. var ms = ApplicationContext.Current.Services.MemberService; Umbraco.Core.Models.IMember mem = ApplicationContext.Current.Services.MemberService.GetById(user.Id); mem.SetValue("somalias",value);<---error
Please help.
Thanks
Hi Rizwan
Be sure that the member has this property. How did you check that the member has this property?
Alex
You can check a property exists by getting the member type and using the
PropertyTypeExists
method.To create custom properties for members please see my answer here https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/78210-add-custom-property-to-membership-member#comment-335629
is working on a reply...