AR Invoice Data Entry - Hide Fields in the Lines Grid

I am trying to hide 5 fields on the AR Invoice Data Entry Lines screen but nothing seems to work.

The fields are visible by default in the grid.

The script event is Post Column Validate on a field in the Header tab.

Can anyone point out what I am doing wrong?

retVal = oScript.SetUIControl("UDF_TESTING_SERVICE_TIME", "HIDE")

retVal = oScript.SetUIControl("UDF_MINIMUM_CHARGE", "HIDE")
retVal = oScript.SetUIControl("UDF_TESTING_SERVICE_PO_NR", "HIDE")
retVal = oScript.SetUIControl("UDF_TESTING_SERVICE_DATE_1", "HIDE")
retVal = oScript.SetUIControl("UDF_TESTING_SERVICE_DATE_2", "HIDE")
retVal = oScript.SetUIControl("UDF_TEST_NUMBER", "HIDE")

Parents
  • 0

    OK I'll bite. If they are UDFs and you want to hide them, why do you add them to the data entry screen in the first place?

  • 0 in reply to BigLouie

    We have two divisions of our business. Based on the division chosen in a dropdown box on the header tab, I want to hide certain fields from the Lines grid that are unnecessary and confusing to the user.

  • 0 in reply to it_q-lab

    Hi

    What you have there looks okay, you could try the following after the .SetUIControl() functions.

    If CBool(oScript.UIObj) Then

      Set oUI = oSession.AsObject(oScript.UIObj)

      retVal = oUI.HandleScriptUI() ' this will immediately invoke the UI changes.

    End If

    Hope this helps.

    Elliott

  • 0 in reply to jepritch

    You can also create a special company/user centric panel in the Custom Office module that hides the data elements.  In Custom Office choose Customizer Selection, selecting Company/User when creating a new panel then choose Accounts Receivable> Invoice Data Entry> PLINES from the menu.  Edit the Grid Lines and Hide (turn off) the desired columns.

  • 0 in reply to PSP-Craig

    Elliot,

    Thanks for the reply.

    I tried adding the code you sent me, but I still cant get even one of the UDF's to hide

    I also tried a MAS90 standard field.

    Does it matter what event my script is connected to?

    Is there a method to refresh the panel/grid?

    Here is my code as of now........

    retVal = oScript.SetUIControl("UDF_TESTING_SERVICE_TIME", "HIDE")
    retVal = oScript.SetUIControl("UDF_MINIMUM_CHARGE", "HIDE")
    retVal = oScript.SetUIControl("UDF_TESTING_SERVICE_PO_NR", "HIDE")
    retVal = oScript.SetUIControl("UDF_TESTING_SERVICE_DATE_1", "HIDE")
    retVal = oScript.SetUIControl("UDF_TESTING_SERVICE_DATE_2", "HIDE")
    retVal = oScript.SetUIControl("UDF_TEST_NUMBER", "HIDE")

    If CBool(oScript.UIObj) Then

    Set oUI = oSession.AsObject(oScript.UIObj)

    retVal = oUI.HandleScriptUI()

    End If

  • 0 in reply to it_q-lab

    Are you sure your script is running at all?  Do you have 'Allow external access' set in company maintenance for the company you are running under?

  • 0 in reply to jepritch

    jepritch,

    Thanks for the reply.

    Yes I know the script is running because I used a message box earlier to ensure something was happening.

    I just checked the "Allow external access" in Company Maintenance and it is checked.

    Not sure if this is important, but I do have a custom screen that I am using while the rest of production is using the ###-### screens. My custom screen has the UDF's I created.

  • 0 in reply to it_q-lab

    Sorry, I missed this before, but all these fields are in the Grid?  That's why this solution will not work.  Unfortunately currently, there is no way to hide these fields that are in the grid.

  • 0 in reply to jepritch

    Ok, so the syntax and everything is ok but your saying that because the UDF's are in a grid, you cant access the attributes of the field to show, hide or disable?

Reply Children