I'm sure someone can help me out here, I'm really much ripping my hair out
why my code below doesn't work. Basically I have a custom entity wich has a list
(and all its list members inside the list) with my custom entity(registerd on
post-create) I create another list which imports all those list members into
another list. Now I need to retrieve the entityID for each list member (in order
for me to add them) My code below (just for one list member for testing
purposes):
// GET LIST MEMBER
QueryByAttribute query = new QueryByAttribute("listmember");
query.AddAttributeValue("listid", m_list_ID.Id);
ColumnSet cs = new ColumnSet();
cs.AddColumns("entityid");
query.ColumnSet = cs;
EntityCollection entityCollection = service.RetrieveMultiple(query);
Guid g = Guid.Empty;
g = (Guid)entityCollection.Entities[0].Attributes["entityid"];
To check the guid I output the GUID on another field as a string just to
check if it has th right one, but when I try to save the form I get the error
"System.InvalidCastException: Specified cast is not valid.". On another note, which is quite strange to me is
when I try the same with "listmemberid" which is also in listmember table I get the GUID, its just when I try
to grab the entityId I get this error.