cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to add new user to Collaborator List

former_member208675
Active Contributor
0 Likes
455

Hi,

Is there any to add new user to Collaborator List of Master Agreement List through scripting?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

A new user can be added to the collaborator list as follows....

//Create a collection memeber

collabColln=doc.getCollaborators();

newMember=collabColln.create();

//Set the Necessary values...Here are some sample setters. Details about the setter functions are provided in the RG

newMember.setApprovalRule(new CollaboratorApprovalRuleType(new Integer(0)));

newMember.setCollaboratorEmail("EmailAddress");

roleBean.setDisplayName("role Display name");

newMember.setCollaboratorType(new CollaboratorTypeEnumType(0));

newMember.setDisplayName("Display Name");

newMember.setSource(new CollaboratorSourceEnumType (0));

newMember.setUsage(new CollaboratorUsageEnumType(0));

//Set other mandatory or rquired data....

//add the collection member to the collection

collabColln.add(newMember);

//save the document

doc.getIBeanHomeIfc().save(doc);

Use the appropriate bean instead of doc if the script is not executed from the document for which the collaborator is added.

hope this helps.

Regards

Immanuel

Former Member
0 Likes

Hi Immanuel,

I am currently trying the same but I could not figure out how to set a specific group as collaborator. Where can I set the specfic group object?

Thanks to everyone and regards,

Özlem

Former Member
0 Likes

Hello Özlem,

Once you find the group (GroupIBeanIfc):

newCollab = doc.getCollaborators().create();

newCollab.setPrincipal(group.getObjectReference());

//group variable is of type GroupIBeanIfc

doc.getCollaborators().add(newCollab);

This will simply add the group as collaborator with default values for role and type.

Bogdan Toma

Former Member
0 Likes

Thank you Bogdan! That helped.

I also added Role like this. There was no other info necessary

groupHome = IBeanHomeLocator.lookup(session, GroupIBeanHomeIfc.sHOME_NAME);

group = groupHome.findGroup(member);

groupRef = group.getObjectReference();

collaborators = doc.getCollaborators();

newMember = collaborators.create();

newMember.setPrincipal(groupRef);

roleHome=IBeanHomeLocator.lookup(session,CollaboratorRoleIBeanHomeIfc.sHOME_NAME);

roleBean=roleHome.findUniqueByName("Reviewer");

roleObjRef = roleBean.getObjectReference();

newMember.setCollaboratorRole(roleObjRef);

collaborators.add(newMember);

Thanks and regards,

Özlem

Answers (1)

Answers (1)

Former Member
0 Likes

On the RG area of E-Sourcing application, there is detailed documentation and import work books for importing several Master Agreement and Agreement fields into the application and Collaborator is one of the fields. Please refer "View the sample Contracts Import Workbook" to obtain additional help.

I am not too sure, if you will be able to populate the Collaborator field using scripting.

Regards,

Parankush