Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
New Member
Posts: 4
Registered: ‎08-15-2009

How to find Group ID of Account group

Hi,

 

I am using this code to find group id

 

groupId = Application.BasicFunctions.GetGroupIDs("ACCOUNT", cmbGroups.Text)

 

But it is giving me different number all the time it runs for same group name. I am not sure what I am doing wrong here.

 

Any ideas? it is under Saleslogix 7.5.4

 

 

Employee
Posts: 629
Registered: ‎04-24-2009

Re: How to find Group ID of Account group

The GetGroupIDs() function returns a string handle; it will always be different. Please see "System:Keyword Search" VBScript for an example:

 

Sub cmdSearchClick(Sender) 
 Dim objSearchResults 
 Dim arrIDS, arrAddHoc 
 Dim intCount 
 Dim hndGroupIDs 
 Dim i 
 Dim arrGroupIDs() 
 Dim intGroupCount 

 Dim intTable 
 Dim strList 
 Dim strGroup 

 On Error Resume Next  'Let SS Handle Error Messages 

 set objSearchResults = objSS.PerformSearch(GetIndexes, nothing, txtSearch.Text, 1, 0, 0, 0, 0)
  arrIDs = SearchResultsAsArray(objSearchResults, GetBaseID, intCount) 

 if rgFilters.ItemIndex = 1 then 
   'get plugin list for localized display name 
   Select Case gstrMainTable 
     Case "CONTACT"       intTable = 0  'DNL 
     Case "ACCOUNT"       intTable = 1  'DNL 
     Case "OPPORTUNITY"   intTable = 2  'DNL 
   End Select 
   strList = Application.BasicFunctions.GetGroupList(intTable, 0) 
   strGroup  = Application.BasicFunctions.CSVField(strList, cboGroup.ItemIndex+1)
 
   hndGroupIDs = Application.BasicFunctions.GetGroupIDs(gstrMainTable, strGroup)
    intGroupCount = Application.BasicFunctions.GetGroupCount(hndGroupIDs) 
   ReDim arrGroupIDs(intGroupCount) 
   for i = 0 to intGroupCount - 1 
     arrGroupIDs(i) = Application.BasicFunctions.GetGroupValue(hndGroupIDs, i) 
   next 

   arrAddHoc = MergeArrays(IDArrayWithoutDuplicates(arrIDs, intCount), arrGroupIDs)
  else 
   arrAddHoc = IDArrayWithoutDuplicates(arrIDs, intCount) 
 end if 

 CreateAdHocGroup arrAddHoc 

 On Error Goto 0 
End Sub 

 

 

 

Thanks

 

Mike