How to hide the child records subtab on the grant ...
# ask-stanley-ai
a
How to hide the child records subtab on the grant record NFP product. Subtab does not exist on the custom record. How can I find the ID of the subtab so I can hide it via a script
c
AI generated answer (using internal Slack threads):
To hide the child records subtab on the grant record NFP product, you can use a client script. However, if the subtab does not exist on the custom record, it might be a bit tricky to find the ID of the subtab. Here are a few methods you can try: 1. Set a value for any field on the line level in that tab and save the record. After saving the record, you can add
&xml=T
at the end of the URL. This will display the XML structure of the record, and you should be able to find the ID of the subtab in this XML structure. 2. Use the NetSuite Field Explorer Chrome extension. This extension can help you explore the fields and their IDs on a NetSuite record. 3. Go to the record browser in the help center. The record browser provides a list of all standard and custom record types in your account, and you can find the ID of the subtab there. If you still can't find the subtab, it might be due to a feature that has been turned on. Check your account setup and features to see if there's anything that might be causing the subtab to appear. Once you have the ID of the subtab, you can use a client script to hide it. Here's a sample script:
Copy code
javascript
function pageInit(type){
    if(type == 'create' || type == 'edit'){
        var currentForm = nlapiGetFieldValue('customform');
        if(currentForm == 'your_form_id'){
            nlapiGetLineItemField('recmachcustrecord_your_field_id', 'custrecord_your_field_id', 1).setDisplayType('hidden');
        }
    }
}
Replace
'your_form_id'
with the ID of your form, and
'custrecord_your_field_id'
with the ID of the field you want to hide. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.854144216
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834289312
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830016
Please provide your feedback on this answer.