g_form.setReadOnly('variable',true); not working in RITM level using on load Client script

Suresh1
Tera Guru

Hi Team,

 

I am using an On Load Client script to set a variable ReadOnly. The field is in the variables section, and it's not setting to readonly.

its silly but could n't figure out what is the issue... I have checked the UI policies, other client scripts and there is no collision happening.

 

Please let me know what could be the issue.

 

Regards,
Suresh

10 REPLIES 10

Suresh1
Tera Guru

Hi All

 

Thanks for the suggestions, I figured out the issue ,it is due to cross scope scripts issue. 

 

My business rule , client script both are in same custom application scope and for custom app scopes, setreadonly won't work, so i made my client script alone to global scope and now, setreadonly works.

 

Time to learn weird things too 🙂