- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 11:52 AM
I have modified the Access Control dmn_demand.type so that the Type field can be modified on the demand form if the value is --none--. Right now it is not detecting it as this and instead remaining in read-only mode.
I thought that this value was simply null or blank but this doesn't seem to be working, see code below:
answer=false;
if((JSUtil.notNil(current.getValue('type')) && current.getValue('type').startsWith('no_conversion_')) ||
(current.getValue('type') == 'project' && current.project.nil()) ||
(current.getValue('type') == '' && current.project.nil()) || // added
(current.getValue('type') == 'enhancement' && current.isValidField('enhancement') && current.enhancement.nil()) ||
(current.getValue('type') == 'enhancement' && !current.isValidField('enhancement')) ||
(current.getValue('type') == 'change' && current.change.nil()) ||
(current.getValue('type') == 'defect' && current.isValidField('defect') && current.defect.nil()) ||
(current.getValue('type') == 'defect' && !current.isValidField('defect')))
answer = true;
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 05:19 PM
Try updating the line you added to be:
(current.getValue('type') == null && current.project.nil()) || // added
I think in this case current.getValue is returning null / undefined rather than a string.
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 05:19 PM
Try updating the line you added to be:
(current.getValue('type') == null && current.project.nil()) || // added
I think in this case current.getValue is returning null / undefined rather than a string.
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2024 06:20 AM
Doesn't look like this worked.
I'm wondering if the current.project.nil() needs to be adjusted since it isn't checking against 'project' anymore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2024 06:29 AM
This did it! Greatly appreciate the help.
At first it wasn't working but I remembered there was still a default value within the dictionary for Type. Removing that and modifying the code resolved the issue.