I have a situation where I want fields on a record type to be normally hidden and not used unless a user meets a specific condition, then I will create a sub-tab on-the-fly and make these fields visible.
I setup four fields:
1. A list/record field to a custom record.
2. A checkbox field that sources to the list/record field above and to a checkbox field on the custom record.
3. A list/record field that sources to the list/record field above and to a list/record field on the custom record.
4. A text area field that sources to the list/record field above and to a text area field on the custom record.
For all of these fields, I set the default display to 'hidden' since I want them by default always hidden. They are stored in the 'main' section of the form (not the 'custom' section).
In a before load script, I check if the user is valid. If so, I create on-the-fly a sub-tab. I then through script "move" (using nlobjForm.insertField) these four fields from the main section to this newly created tab.
The form appears correctly with the tab and fields all set and visible as desired. However when I select a record in the list/record field (#1 above) no sourcing occurs. I am not sure if somehow the sourcing was broken upon making it visible or it was broken when moving the fields from the main section to the subtab. In any case, sourcing does not work under this scenario.
Wondering if any other developers have come across this issue and if you have resolved in some way. I need to keep these fields hidden by default however and make them visible on the fly through scripting.
Thanks.