Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
New Member
JuVal
Posts: 4
Registered: 10-03-2009

Cannot access the ContactID in Notes-History form on bottom of main view

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?

Please use plain text.
Gold Super Contributor
RJLedger
Posts: 2,234
Registered: 03-19-2009

Re: Cannot access the ContactID in Notes-History form on bottom of main view

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.

 

--
RJ Ledger - rjledger@rjlSystems.net

".. Stay Focused..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Please use plain text.
New Member
JuVal
Posts: 4
Registered: 10-03-2009

Re: Cannot access the ContactID in Notes-History form on bottom of main view

So then how do I get the ContactID in order to populate my History datagrid?
Please use plain text.
Copper Elite Contributor
mrudnick
Posts: 33
Registered: 02-10-2009

Re: Cannot access the ContactID in Notes-History form on bottom of main view

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

 

 

Martin Rudnick
Wells Fargo
SalesLogix Product Manager

"When in doubt, log out...and reboot"
Please use plain text.
Gold Super Contributor
RJLedger
Posts: 2,234
Registered: 03-19-2009

Re: Cannot access the ContactID in Notes-History form on bottom of main view

frmContactDetail.CurrentID - it's a property of the form.
--
RJ Ledger - rjledger@rjlSystems.net

".. Stay Focused..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Please use plain text.
New Member
JuVal
Posts: 4
Registered: 10-03-2009

Re: Cannot access the ContactID in Notes-History form on bottom of main view

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.

Please use plain text.
Copper Elite Contributor
mrudnick
Posts: 33
Registered: 02-10-2009

Re: Cannot access the ContactID in Notes-History form on bottom of main view

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

Martin Rudnick
Wells Fargo
SalesLogix Product Manager

"When in doubt, log out...and reboot"
Please use plain text.
New Member
JuVal
Posts: 4
Registered: 10-03-2009

Re: Cannot access the ContactID in Notes-History form on bottom of main view

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")

Please use plain text.