Hide Foreign Key Field

 
'**********************************************************************
' Name    : HideForeignFieldEx
' Purpose : To Hide FK Field using DHTML
'**********************************************************************
' Inputs:
'   sTabName : tab name   
'   sSegmentName : segment name       
'   sFieldName : field name
' Returns:
'   N/A
'**********************************************************************
Sub HideForeignFieldEx(sTabName, sSegmentName, sFieldName) 
    
    Dim oField 
    Set oField = UIMaster.RUICenter.GetForeignFieldEx(sTabName, _ 
                                    sSegmentName, sFieldName)
    Dim oTDs    
    Dim oTD
    
    'Hide the label
    UIMaster.RUICenter.GetFieldLabelEx(sTabName, _ 
                       sSegmentName, sFieldName).style.display = "none" 
    'Hide the Input
    oField.InputElement.style.display = "none" 
    Set oTDs = oField.ParentElement.GetElementsByTagName("TD")
    For Each oTD In oTDs
        oTD.style.display = "none"
    Next
End Sub
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: