Creating a custom combo box to call an existing program

Can anyone provide an example of using Customizer to create a Combo button that calls an existing SAGE program? 

Context:  I'm looking to add a Combo box on Customer Status to call the "Other Contacts" program that is already on Maintain Customers.  The program file is cizmudl1.dll

  • 0

    Katie,

    The contacts form is a common stand-alone task, and it requires additional context and management code since it is not a child form of Customer Status. You also really want to stay away from using a combobox control event to instantiate a drill down or drill around action, so I wouldn't recommend trying to add this feature to the form. Why not have the users just employ the Customer context menu to drill into to Maintain Customers? Training them to right-click on controls might help them understand how to use the context menus as well as get What's This? help on the control.

  • 0 in reply to Contefication

    Sorry!   I didn't mean Combo box, I meant command.  I wanted to create a Click button that will load the Other Contacts screen but from Customer Status. 

  • 0 in reply to KatieFlanagan

    Same problem. It's passing the context and properly managing the form that's an issue. Are you trying to just display contacts or provide an editing feature?

    DA and DD methods can vary depending on the methods supported by the form or interface. For example, here is a simplified method to start Maintain Vendors from Maintain Customers, but there is already some context between the 2.

    Dim oSotaObject
    Dim lTaskID
    Dim sVendID

    'Get VendID from control
    sVendID = Form.Controls("txtVendor").Text

    'Set TaskID from tsmTask
    lTaskID = 67174401

    'Set task object
    Set oSotaObject = Session.moClass.moFramework.LoadSOTAObject(lTaskID, kDDRunFlags, 2)

    'Start task and pass vendor ID using drill around method
    oSotaObject.DrillAround sVendID

    Set oSotaObject = Nothing

    The DrillAround method requires a framework reference and task ID so it's simple to use in most cases, but you can't use it with the contacts form. As I noted, this is because it is a common stand-alone form, it requires context, must be bound and managed.

    In simple terms, the context tells it the entity type (customer, vendor, etc.) since it is bound to the tciContact table without this. It also needs to be managed for context changes (change to CustID in the parent form), and it should be modal, so there is only 1 iteration of the form and to prevent it being orphaned when the parent form is shut down.