Avatar

Community Advisor

Hello SorenDahk,

 

You can try to use the "Unregister" method of nmsGroup object with a JS.
As it is not a static function, you have to load your list and then remove your element with a query (this is not well documented in the JSAPI, I had to do some test) :

var listId = listId; //You have to know your list ID
var recipientId = recipientId //You have to know your recipient (or what you want to delete from list) ID
var myList = NLWS.nmsGroup.load(listId); //Load the list
myList.Unregister( 
    <listChoice selectAll="false"><key value={recipientId}/><where><condition expr={"@id = " + recipientId}/></where></listChoice>
     );//Remove the element from the list (beware, the identifier here is the @ID attribute, but it can be another attribute :winking_face: )

Hope this could help.

Cedric