How to disable toolbar button and load another item on item maintenance form

SOLVED

I have a customization project to create a customized item copy function on Inventory Item Maintenance form. A custom command button is added to the form. When user clicks the button, it fires stored procedure I created to copy the current item with a new ItemID.

The form has a built-in copy command button on toolbar, is it possible to disable this built-in command button on toolbar

After the copying is done, how to reload the form with new item id

Thanks

Parents Reply
  • 0 in reply to yzou

    I'd suggest finding out what additional things need to be done, adding code to the Copy command screen and/or the Form Save Customizer event (if you have Customizer). In Customizer, the command to disable the button is:

     Form.Controls("tbrMain").ButtonEnabled("K11") = FALSE

    outside customizer, just tbrMain.ButtonEnabled......

Children
  • 0 in reply to dbcoles

    Customizer is used for this project. After copying is done, I would like to load the form with newly copied item. In sales order form, I can use DrillAround to load a sales order by passing SOKey. Do you know a way to load item by passing either companyid + itemid or itemkey in customizer?

    We did consider your suggestion to modify the existing copy function. But it did not work out.

    Thanks again!

    Youdao