AnsweredAssumed Answered

How can you make read only fields unlockable by admins?

Question asked by gabriel.shanahan gabriel.shanahan on May 18, 2014
Latest reply on Jun 13, 2014 by Alex Nassi
We are developing Sugar for a customer, and have created a custom dependency that locks all fields when an opportunity is set to closed won/closed lost. However, we would also need a way to allow only administrators to unlock such fields (or have them not locked for admins at all, either way works).
The way we attempted to do this is to create a custom SugarLogic function which basically returns $current_user->is_admin. Unfortunately, while this function works beautifully when used in a calculated field, the custom dependency doesn't call it at all and automatically evaluates to false (i.e. the field is not read only).
My question is twofold - are we even going about this the right way and either way, why isn't the dependency recognizing the function?

I can post some code if necessary. The version we are using is Sugar 7.1.6 professional.

Kind regards,

G. Shanahan
SugarFactory s.r.o.

Outcomes