Adding PopUpMenu Items dynamically to the DataGrid’s PopUpMenu in SalesLogix6.2

Hi All,

You can use the following method to add menu items dynamically to the PopUpMenu of the DataGrid control of the SalesLogix6.2 LAN Client.

Sub PupulateMenu()

dim objMnu,i
dim arrMenuItems

 arrMenuItems = Array(“Menu Item1″,”Menu Item2″,”Menu Item3″,”Menu Item4”)
 set objMnu = <DataGrid Control Name>.PopupMenu

 For i=0 to Ubound(arrMenuItems)
 objMnu.Items(i+1).Caption = arrMenuItems(i)

End Sub

Sub <DataGrid Control Name>MenuClick(Sender,Item) 

Select case  <DataGrid Control Name>.PopupMenu.MenuIndex
        case 1
             msgbox “Menu Item1 Selected”
        case 2
             msgbox “Menu Item2 Selected”
        case 3
             msgbox “Menu Item3 Selected”
        case 4
             msgbox “Menu Item4 Selected”
        case else
             msgbox “Invalid Menu Option”
 End Select

End Sub

Happy Coding!! 🙂

How to do a SalesLogix6.2 Mail Merge

    Dim strPluginId,strField,strTable,strWhere,strContactId, strOpportunityId,strTemplate

    strContactId = Application.BasicFunctions.CurrentContactID
    strOpportunityId = Application.BasicFunctions.CurrentOpportunityID

   strTemplate = “<Template Name>”

    strField = “PLUGINID”
    strTable = “PLUGIN”
    strWhere = “TYPE = ’25’ AND NAME = ‘” & strTemplate & “‘ AND userid = ‘SYST00000001′”‘”‘ AND RELEASED = ‘T'”
    strPluginId = GetField(strField,strTable,strWhere)

    Application.BasicFunctions.MergeFromPlugin strPluginId, 2, strContactId, strOpportunityId

   Merge Modes

            1 – Fax

            2 – Word Document 

            3 – E-Mail