- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2016 08:32 PM
Hi Friends,
I have created drop down box in incident i made it as a mandatory.
Now i want make it visible for newly creating records only, if we open existing records it should be invisible.
Please help me how to make it.
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2016 08:48 PM
Control the mandatory functionality from a on load client script and disable the mandatory functionality from other places you have added.
Then write a on load client script like:
if(g_form.isNewRecord()){
g_form.setMandatory('field_name', 'true'); ////provide field name here
}
else{
g_form.setMandatory('field_name', 'false');
}
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2016 08:48 PM
Control the mandatory functionality from a on load client script and disable the mandatory functionality from other places you have added.
Then write a on load client script like:
if(g_form.isNewRecord()){
g_form.setMandatory('field_name', 'true'); ////provide field name here
}
else{
g_form.setMandatory('field_name', 'false');
}
Thanks,
Mihir

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2016 08:59 PM
Use g_form.isNewRecord() method.
Thanks,
Abhinay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2016 12:41 AM
Hi Venkata,
Create a on-load client script on incident table and write below code :
if(g_form.isNewRecord()) {
g_form.setDisplay('field_name', true); ////provide field name here
g_form.setMandatory('field_name', true); ////provide field name here
}
else {
g_form.setMandatory('field_name', false);
g_form.setDisplay('field_name', false); ////provide field name here
}
Also remove is there is any UI policy action applied on the same field.
~Paramveer Singh
~Senior Developer
Please mark Helpful, Like, or Correct Answer if applicable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2016 01:15 AM