- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 12:55 PM
Hi all,
I've got a scoped app I've built that has a parent table (extended from Task), that has a related list to a 2nd child table (also extended from Task).
I need to have ability to create a "Task" from the related list be blocked if one of the fields on the parent record is empty.
Anyone tried this before? thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 01:46 PM
Sorry should have provided more, so
- Right click on your related list and choose configure list control.
- Add the omit new condition field to your form
- Enter the appropriate condition where parent is the "parent" table. Below is an example where I hide the new button when the parent record's status is not 1
var answer;
if (parent.state == 1 ) {
//Do not remove the 'New' button
answer = false;
}
else {
//Remove the 'New' button
answer = true;
}
answer;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 03:58 PM
thanks so much Michael, so the first change of adding the "omit new condition" field to the list control form is done is a global scope?
Is that captured in an update set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 06:26 PM
The form change will be captured in a global update set. Unfortunately scoped and global updates cannot reside in the same update set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 04:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 06:30 PM
Ignore the warning in the script. i prefer to use the gs.nil() function over ='' Since it evaluates more criteria like null, undefined, etc.
if (!gs.nil(parent.ehs_sme))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 04:39 PM
this should only affect whether the NEW button for the related list on the parent record shows, correct?
Does it overrule script within a record producer that is supposed to be setting some fields on the record when submitted?