cancel
Showing results for 
Search instead for 
Did you mean: 

Locking the fields in a master agreement

Former Member
0 Kudos

We have a requirement where we need to lock the fields of a master agreement based on multiple conditions. For example, if user A is in a particular group and the document is in a particular phase(status) then certain fields have to be locked.

We are trying to do it using scripting.

We need to lock the entire document except for a few fields. Is there any way we can get the field ID's of the standard fields in the master agreement either using java APIs or using DB queries in order to avoid manually coding all the field id's in the script?

I am able to retrieve the Field ID's of the extension fields through a DB query. However i am unable to retrieve the Field ID's of the standard fields. I tried to retrieve the field ID's using java reflection, but i am still unable to retrieve the entire list.

Any help in this regard would be highly appreciated.

Thanks and Regards,

Immanuel

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Unfortunately I do not think there is a systematic way to find all of the existing fields via a query. Your best bet is to manually list each field you want to lock.

Let me know how it goes for you...in my opinion, the lock manager is extremely slow and inefficient. Locking multiple fields can become unbearably slow if there are many fields. You might want to stick with [un]/locking the entire document.

-Howie Wexler

Crafty Systems, Inc.

Former Member
0 Kudos

HI howie,

You were right,using lock manager for locking fields is badly hits performance. We have abandoned that approach. Right now we are considering an approach wherein we leave the fields unlocked but put a check on the fields that a particular user can edit. I am guessing this is also going to be cumbersome.

We cannot lock/unlock the whole document as different user groups should be able to edit a different set of fields.

Former Member
0 Kudos

Hi Immanuel,

you can lock the fields using IapiDocumentLockManager.lockField(session, doc, "FIELDNAME");

Regards,

Tayi