- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 02:42 AM
There is one field where the value needs to be set as Break-fix and I need make the field read only.
The field is for emergency change. I have written a onload client scrip for that field.
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.getValue('type') = 'standard'){
g_form.setValue("u_reason_for_change", Break-fix);
g_form.setReadOnly("u_reason_for_change", true);
}
}
The code is not working for this field, could you please help to fix it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 03:45 AM
HI @Kaushik Ghosh ,
I trust you are doing great.
Please refer below script for the same.
function onLoad() {
if (g_form.getValue('type') == 'standard') {
g_form.setValue("u_reason_for_change", "Break-fix");
g_form.setReadOnly("u_reason_for_change", true);
}
}
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 04:14 AM
Hello @Kaushik Ghosh
I think You have not give Inverted Commas on Break-Fix thats why it is Coming,
Can you plz Mark my Solution as Accept, The main issue was for double equals to.
Regards,
Samaksh