Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hello,
I want automatically remove the member from user group by using service. please suggest how do I write code to remove member from user group ??
Thanks in advance
Solved! Go to Solution.
Check below code, i have just tried it and it is working for me. Change user and group as per your data.
var params = {
member: "MohitUser1" /* STRING */,
type: "User" /* STRING */
};
// no return
Groups["users1"].DeleteMember(params);
Do let me know in case of any question.
Regards,
Mohit
Thanks for your reply I 'll refer this post. it only gives how to add a User to Developer Group and I just want to remove that user from user group I don't want to remove manually .please suggest how do I automatically remove user from user group??
Hello @RM12
Have you checked the default services available under Organization, Groups and even for individual users. Like for a particular Group you have services like AddMember(), AssignMembers(), DeleteMembers() and you'll see similar ones for Organization as well.
Regards,
Toolika Dixit
Check below code, i have just tried it and it is working for me. Change user and group as per your data.
var params = {
member: "MohitUser1" /* STRING */,
type: "User" /* STRING */
};
// no return
Groups["users1"].DeleteMember(params);
Do let me know in case of any question.
Regards,
Mohit