How can I disable the contract Submit button for all users except the admin?
Use a Groovy script to disable the Submit button for all users except Contract Administrators on a specific contract that's in Draft or Under Amendment status.
Note: Contract Administrator here isn't security role, but a party
contact role on the Contract, using the lookup code CONTRACT_ADMIN.
You set up a guard condition for the event Submit in Event Models using this script:
def contacts=MergeContractPartyContact;
def mail=adf.context.getSecurityContext()?.getUserProfile()?.getBusinessEmail();
while(contacts.hasNext())
{
def contact_rec=contacts.next();
if(contact_rec.EmailAddress==mail){
if(contact_rec.CroCode == 'CONTRACT_ADMIN'){
return true;
}
}
}