Unable to retrieve values from Multinode Tree Picker (MNTP2) from IMember
In Umbraco 7.15.3, I have a MNTP2 storing a list of related members on a member profile. I call the property "memberReferrals".
I am trying to query the value, update it and save using through the memberservice:
Guid referringMemberGuid = new Guid(model.ReferringMemberGuid);
var referringMember = memberService.GetByProviderKey(referringMemberGuid);
var myValues = referringMember.GetValue<IEnumerable<IPublishedContent>>("memberReferrals");
In the case above, myValues returns empty, even though there is an entry in the profile and the property returns not null.
I can do this by using the Umbraco helpers and the values return as expected...but not when using the memberservice.
Guid referringMemberGuid = new Guid(model.ReferringMemberGuid);
var referringMemberHelper= Members.GetByProviderKey(referringMemberGuid);
if (referringMemberHelper.HasValue("memberReferrals"))
{
var pastReferrals = referringMemberHelper.GetPropertyValue<IEnumerable<IPublishedContent>>("memberReferrals");
}
Any ideas why this would you cant get MNTP values returned from MemberService? Seems a little excessive to have to use both the IMember service plus the IPublished content just to get and update a value.
Unable to retrieve values from Multinode Tree Picker (MNTP2) from IMember
In Umbraco 7.15.3, I have a MNTP2 storing a list of related members on a member profile. I call the property "memberReferrals".
I am trying to query the value, update it and save using through the memberservice:
In the case above, myValues returns empty, even though there is an entry in the profile and the property returns not null.
I can do this by using the Umbraco helpers and the values return as expected...but not when using the memberservice.
Any ideas why this would you cant get MNTP values returned from MemberService? Seems a little excessive to have to use both the IMember service plus the IPublished content just to get and update a value.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.