cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable a collection extension field on duplicating/editing.

Former Member
0 Kudos

Hi,

i am trying to duplicate/edit a project and depending on the usergroup that's logged in 2 fields - one of them is a extension and other a collection extension need to be either enabled or disabled. Have managed to lock/unlock (using IAPI LockManager) the fields based on the group of the user. when i lock the field the extension field gets disabled, but the collection extension fields buttons like Add, delete gets disabled but not the actual field. I am still able to edit the collection extension field on lock. how can i get it disabled or read only. what IAPI would help?

Regards,

Patsy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try Including each collection attribute in the script along with the collection name.

Let us know...

Former Member
0 Kudos

This dint help. I tried adding each of the extention collection member( apart from the extension collection itself) in the script.

I also tried using conditional page customizing, but again that works only for extension fields, not for extension collection member.

Is there any other way out?

Former Member
0 Kudos

In order to lock individual collection fields, you must iterate over the collection and invoke the lockField(), for each member attribute you wish to lock.

iterator = mycolln.iterator();
for(member : iterator) {
   IapiDocumentLockManager.lockField(session, member, "foo");
   IapiDocumentLockManager.lockField(session, member, "bar");
}

Former Member
0 Kudos

Thank You Gary. That was a perfect solution!

Appreciate your help.

Answers (0)