Hide Detail Comment on A/P Invoice Detail Grid and Popup

BUSINESS REQUIREMENT

A company wants to hide Detail Comment field on A/P Invoice entry screen, in both grid and popup

KEY LEARNINGS

UI subclassed script

Use this script to find name of popup control and fields on screen

EXTENDER SETUP KEY STEPS

Install the latest product update for Extender.

In Extender Setup > Script, upload the downloaded file.

Restart the Sage desktop.

VARIATIONS

  • Hide only for certain users/user groups
  • Apply to other grids/screens -

 

Example:

For example to hide Average cost field in I/C Location details.

Rename the script to include the Program ID of the screen (IC1130 for Location Details).

Amend the first line of the script to include the Program ID (IC1130)

Run the screen with the showMessageBox un-commented. Confirm the pop-up name and the field names

Amend the script to use the new pop-up name

def onPopupOpened(self, e):

def onPopupOpened(self, e):
   # print the event parameters
    e = parseArgs(e)
    strPopupName1 = e["strPopupName"]
    # uncomment next line to get the name of the popup  you want to work with
    showMessageBox("Popup name: " + strPopupName1)
    # replace with your pop-up name
    if e["strPopupName"] != "frmDetail":
        return
    s = ""
    for k in e.keys():
        s = s + k + "=[" + e[k] + "], "
    self.getControlInfo("", self.onPopupControls) # This will list all controls on the form
    # replace with the field name and label you want to hide
    self.getHostControl("lblTitleAPIBDComment").hide() # this is the AP Comment detail label field
    self.getHostControl("txtAPIBDComment").hide() # this is the AP detail comment field

TESTING

Enter an A/P Invoice, the Comment field is hidden. Use the Message Boxes to find the control names of other fields you want to hide.

When it is working as you require, you can comment out the message with the name of the pop-up and the name of the controls.

Requirement!

This functionality requires Extender Developer.