Quantcast
Channel: SQL Server Master Data Services forum
Viewing all articles
Browse latest Browse all 1311

how to add a reference to another entity member when creating a member

$
0
0

I need to create a member that one of its Attributes (maybe my term is wrong) is a reference to another entity member named group 

the code 

createRequest.Members.MemberType = MemberType.Leaf;
            createRequest.Members.Members = new System.Collections.ObjectModel.Collection<Member> { };
            Member aNewMember = new Member();
            aNewMember.MemberId = new MemberIdentifier() { Name = uag.groupName, MemberType = MemberType.Leaf };



            aNewMember.Attributes = new Collection<MDSService.Attribute>();

            aNewMember.Attributes.Add(new MDSService.Attribute { Identifier = groupID }); // groupID is Identifier I got of the referenced group

//Some other attributes here

createRequest.Members.Members.Add(aNewMember);

            // Create a new entity member
            EntityMembersCreateResponse createResponse = clientProxy.EntityMembersCreate(createRequest);
Tells me:  "The attribute data type is not valid"

Is it wrong to add the reference as attribute? 

How can I embed the reference in the new member? 


Ofer Gal


Viewing all articles
Browse latest Browse all 1311

Trending Articles