Adding a user group to a user sounded fairly easy...took a bit of digging in the ambiguous Item..fields.You need to add user or get use before adding usergroup, not possible in same operation as add user.
UpdateUserGroupReq _uug_req = new UpdateUserGroupReq();
_uug_req.Item = "Standard CCM End Users";
_uug_req.ItemElementName = ItemChoiceType63.name;
XUserGroupMember _xugm = new XUserGroupMember();
UpdateUserGroupReqAddMembers _xugam = new UpdateUserGroupReqAddMembers();
_xugm.uuid = _sres.@return;//This is the return from addUser
_xugm.Item = _xuser.userid;
_xugam.member = new XUserGroupMember[] { _xugm };
_uug_req.Items = new UpdateUserGroupReqAddMembers[] { _xugam };
_uug_req.ItemsElementName = new ItemsChoiceType6[] { ItemsChoiceType6.addMembers };
_sres = _proxy.updateUserGroup(_uug_req);
UpdateUserGroupReq _uug_req = new UpdateUserGroupReq();
_uug_req.Item = "Standard CCM End Users";
_uug_req.ItemElementName = ItemChoiceType63.name;
XUserGroupMember _xugm = new XUserGroupMember();
UpdateUserGroupReqAddMembers _xugam = new UpdateUserGroupReqAddMembers();
_xugm.uuid = _sres.@return;//This is the return from addUser
_xugm.Item = _xuser.userid;
_xugam.member = new XUserGroupMember[] { _xugm };
_uug_req.Items = new UpdateUserGroupReqAddMembers[] { _xugam };
_uug_req.ItemsElementName = new ItemsChoiceType6[] { ItemsChoiceType6.addMembers };
_sres = _proxy.updateUserGroup(_uug_req);
No comments:
Post a Comment