
10-05-2009 12:46 PM
I am having trouble referencing the ContactID from frmContactDetail to populate a history datagrid. I am calling a stored procedure and I need to pass in the ContactID. I have tried Application.BasicFunctions.CurrentContactID, but it contains a null string. It is populated in several places by using Application.BasicFunctions.SetCurrentContactID. Theoretically it should work, however, it does not.
Also, how do I see the code behind...Application.BasicFunctions?
10-05-2009 01:46 PM
First.. you cannot get at anything Application.whatever.. hard coded part of SalesLogix app.
CurrentContactID is valid when you are in the Contact MainView - not if you are somewhere else.
10-05-2009 01:52 PM
10-05-2009 02:19 PM
One method would be to set global parameter tied to the main contact view
Application.GlobalInfo("CurrentContactID") = Application.BasicFunctions.CurrentContactID
You can then call it anywhere using
strContactID = application.GlobalInfo.CurrentContactID
10-05-2009 02:28 PM
10-06-2009 06:14 AM
It didn't work. frmContactDetail.CurrentID is not available outside of that form. The Notes-History form is a separate form. I also tried using Application.GlobalInfo.Add "CurrentContactID", frmContactDetail.CurrentID in the Contact Detail form and referencing the global variable in the Notes-History form, but it didn't work. I do not think I am using the correct syntax for retrieving the global variable. Application.GlobalInfo.CurrentContactID does not work. In the standard VB6 environment, you could have a Public Function that would have global variables project wide. Surely, SalesLogix has the same capability.
10-06-2009 07:44 AM
What version are you using? Web? What happened when you used the followign syntax when assigning the global variable?
Application.GlobalInfo("CurrentContactID") = Application.BasicFunctions.CurrentContactID
10-06-2009 07:50 AM
Thank you for your help! You were on the right path with your previous post. I got it to work using
On Contact Detail: Application.GlobalInfo.Add "CurContactID", frmContactDetail.CurrentID
On Notes-History: Dim ContactID
ContactID = Application.GlobalInfo.Item("CurContactID")