Quantcast
Channel: SCN : Discussion List - SAP Sourcing
Viewing all articles
Browse latest Browse all 1416

Collaborator delete

$
0
0

Hi,

 

I have a requirement to delete all user group except a couple while creating an agreement from a master agreement. I have the following code, but in the create event the collaborator collection size is only 1 (owner) even though the master agreement has more than 1 collaborator. Hence my code does not delete the required groups. If I put in a validate event it gives the correct size of collaborators and deletes too. But I do not want to perform the delete in that event since I could accidently delete manual entries. Please advise where I can trigger this or an alternate way to solve this issue.

 

DeleteGroupCollaborators()
{

//Get the Collaborator Bean details
collabcol = doc.getCollaborators();

Logger.info(logMsg.setLogMessage("Collab Size"+collabcol.size()));
Iterator iter = collabcol.iterator();
while (iter.hasNext())
{
item = iter.next();
collabname = item.getDisplayName();
Logger.info(logMsg.setLogMessage("Collabname"+collabname));


if (!"Accounts Payable".equals(item.getDisplayName()){
iter.remove();
}
}
}

 

Thanks in advance,

Rani


Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>