11-10-2010 11:55 AM
We created our first new Main View (called Fund related to the Account table via Accountid) and for the most part all seems to work ok but there is one problem that we're not sure how to resolve:
Our Add New Fund Form includes a Lookup Control for Account which we've defaulted to CurrentAccount (similar to adding a New Contact for existing Account). This works fine when Adding a New Fund from Account Detail or List View, Contact Detail or List View and Fund Detail View but we have an issue when Adding a New Fund from Fund List View. If we click on a different Fund with a different Account, the CurrentAccount isn't updated and the user if forced to Lookup the desired Account.
Is there some additional scripting that we need to update CurrentAccount when moving to different records within Fund List View?
11-22-2010 06:21 AM
If you are referring to the concept of there always being a "currentAccount(ID)" (or contact, Opportunity, etc) no matter which entity/MainView you are on, around vers 6.0 SalesLogix removed this "feature" from the product. At first it did not seem to mak e too much impact. However with the capability to create your own MainView based on any table you want (even a custom one) started to hit.
You notice this quickly when creating a new record (Insert "whatever") where the mainview is a custom one and want to have it joined to the "current Account"....well, there is no "current account" at that time. You suddenly realize that you have to put in an Account lookup and the user has to manually locate the "current account".
12-03-2010 06:23 AM
From your post, it sounds like there is no workaround, other than the Account Lookup which we already had.
Thanks once again!
12-03-2010 10:09 AM
You might try making a ref to the AccountMainView (form) and get the value of the CurrentID property directly.
Note, the following assumes you will find a form... you may have to do an "IsObject" test to make sure it does not crash
Set frm = GetForm("mvAccountDetail")
sID = frm.CurrentID
Set frm = Nothing
Function GetForm(ByVal strFormName)
For i = 0 to Application.Forms.Count -1
If Application.Forms(i).Name = strFormName Then
set frm = Application.Forms(i)
Set GetForm = frm