Raj, you can combine extension fields and import script:
- create a extension field of type String in user account for the groups that will be deleted and another for groups that will be added.
- Include this fields in workbook with the values of external ids of the groups(delimited by ~) that will be deleted or added.
- So create a import script (Process row) for user account:
groupsDel = doc.getExtensionField("GROUPS_DEL").get();
if(hasValue(groupsDel)) {
id_groups = groupsDel.split("~");
for(id_gr: id_groups) {
doc.removeFromGroup(id_gr);
}
}
groupsAdd = doc.getExtensionField("GROUPS_ADD").get();
if(hasValue(groupsAdd)) {
id_groups = groupsAdd.split("~");
for(id_gr: id_groups) {
doc.addToGroup(id_gr);
}
}
- If default group will be deleted, it's necessary to define other default group after this code.
Francisco