hide UI action button for signing contracts = true

asd22
Tera Contributor

Hello.

 

I have a UIaction button "accept contract", when this is clicked and the value u_singed_contract becomes TRUE.

I want to hide the UIaction button. I tried to do it with a ui policy that said "when u_signed_contract = true"  "accept contract visible = FALSE".

This did not work, any tips?

1 ACCEPTED SOLUTION

Sonam_Tiwari
Kilo Sage
I would suggest, keep the client callable checkbox in script include as checked and try this out.
 
In condition : new conditions_hidestudbutton ().isContractSigned(current);
 

 

var conditions_hidestudbutton = Class.create();
conditions_hidestudbutton.prototype = Object.extendsObject(AbstractAjaxProcessor, {

function isContractSigned(current) {
  return current.u_contract_signed_student; // if this is true, it will return true and you will be able to see the UI action else not
},

 type: 'conditions_hidestudbutton'
});

 

Consider indicating the response as helpful and marking it as correct if it meets your needs.

View solution in original post

11 REPLIES 11

Thank you, i just have to figure out how to test this since my "condition" field in the UI action has reach its limit and i cant add anything els

Sonam_Tiwari
Kilo Sage

2 ways

Either you can change the max length on the dictionary entry of condition field (which is not a good idea as you will be touching an OOB object's config)

 

2nd needs bit of a work : You will have to move all or part of your existing checks in the condition field to script include to adjust -->new conditions_hidestudbutton ().isContractSigned(current); there. 

Consider indicating the response as helpful and marking it as correct if it meets your needs.