Hide the field using business rule

karishmashaik
Kilo Expert

Hi team,

my  requirement is I have one choice field based on that field attachment field  should visible while selecting choice field ,by using UI policy in new state I have written this it's working fine, my second requirement is attachment field  should visible for one particular group but the attachment field  is should not visible any groups in next state  please help me on this .

I have written business rule (scratch pad), onload client script but it's not working:

function onLoad() {
var openedBy = g_form.getValue('opened_by');
if ( openedBy == g_user.userID || g_scratchpad.cost ) {

g_form.setDisplay('u_ach_bank_form', true);
g_form.setMandatory('u_ach_bank_form', true);

 

} else {
g_form.setMandatory('u_ach_bank_form', false);
g_form.setDisplay('u_ach_bank_form', false);

 

}
}

 

 

 

Thanks,

karishma

 

5 REPLIES 5

Anil Lande
Kilo Patron

Hi,

As you already have an UI policy to make field visible, also check if any other Ui policy is making field visible.

As per sequence client script execute first and UI policy can override the behavior.

You can debug and find which script/UI policy making field visible.

Open record in content frame (in same window with navigator).

Use watch option to debug your field.

find_real_file.png 

You can find javascript debugger at bottom,

find_real_file.png

 

Again relode form by right ckick on form header and click on Reload Form. Check logs it will help you to understand which script in making field visible.

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande