Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 25, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Re: Custom MainView does not display any forms
Jeff Weight
Posts: 219
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Dec 07 3:51 PM
If you weren't going to use a datagrid, how were you going to move between different database records of goals for each user? Normal fields on the form really aren't meant to represent multiple records - unless you were going to maintain a recordset behind the form and call the row based on some selector, like a datepicker or something. Datagrids allow you to see all the child records in a list. Did you have an idea for how you wanted to handle that?
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Dec 07 3:54 PM
Yes sir. Data picker would be a "weapon of choice". Or I thought about making two command buttons <-- and --> that would move back and forth between weeks.
I can see how I could use datagrid, IF i could make it display columns on a side, not on top. That's the design of the form, hope it displays correctly:


Weekly Goal | Actual Goal
--------------- | --------------
|
Goal 1 __________ | __________
|
Goal 2 __________ | __________
|
Goal 3 __________ | __________

etc.

I think I could simply get away with 24 edit fields by using recordset with GetFields function.... it's not the optimal choice, but that's the only way I can think of

What about changing the base table during runtime? Too crazy of idea?
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Dec 07 4:07 PM
Oh, then, the only reason you will need a data form at all is so it will show up as a tab and to hold an invisible field containing the mainview tableID. You'll need to do the invisible field to activate the OnChange event. The rest of it sounds like a bit of scripting to grab the records and switch between the records. Sounds like lots of fun!
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Dec 07 4:30 PM
No, you wouldn't use GetFields - that would shoot 24 different SQL queries to the database, when you could do it in one - You could even select all the records for that mainview, and iterate through the recordset whenever someone changed the selector.

As for the datagrid, you could certainly do it the way you pictured, but it would have to be a completely managed datagrid - not tied to the database at all.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Dec 07 4:36 PM
--Edited -- sorry, wrong post

PP
[Reply][Quote]
Vladimir
Posts: 93
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Dec 07 2:06 AM
I did the same tab. In the top part of tab I place controls and in the bottom part I place datagrid. When user click on string of datagrid then in controls I get values. But, you need button "Save", because your table is one-to-many and SLX will not save datas.
For example, your tab may ne looks like:

Tab Name
---------------------------------------------
Control 1: |__________| Control 2: |__________| Control 3: |__________|
Control 4: |__________| Control 5: |__________| Control 6: |__________|
Control 5: |__________| Control 8: |__________| Control 9: |__________|

Save
---------------------------------------------
DataGrid
Goal 1 | Some Fields for information
Goal 2 | Some Fields for information
Goal 3 | Some Fields for information
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 07 4:16 PM
Is there a way in SLX to update the DB through RS? For example in VB I could do something like:
myRS.Fields(3).Value = "75"
myRS.Update

And that would actually set the value of 75 to the field in the table.
[Reply][Quote]
Mark Dykun
Posts: 297
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Dec 07 7:49 AM
Konstantin,

Yes, you can load the existing record into a recordset and do the edit of the fields and update as well. There are examples of this spattered throughout SalesLoigx. For example look at the Add Contact Account form plugin.

Mark
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Dec 07 4:02 PM
Quote:
Originally posted by Konstantin Vishnevsky

Is there a way in SLX to update the DB through RS? For example in VB I could do something like:
myRS.Fields(3).Value = "75"
myRS.Update

And that would actually set the value of 75 to the field in the table.


Look at this:
http://www.slxdeveloper.com/page.aspx?id=35&articleid=76

--
rjl
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Dec 07 4:04 PM
Awesome!
Thanks Mark and Bob!
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Dec 07 4:21 PM
Quote:
Originally posted by Konstantin Vishnevsky

Awesome!
Thanks Mark and Bob!


Welcome from the both of us..
(and this reply got me my 625th posting
--
rjl
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 07 10:45 AM
EDIT: Found the answer
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 07 12:04 PM
Sure, I think - declare your RS variable globally, before any of the functions or methods, and then just populate it in the Initialize method.

Also, I haven't tried this before, but you could try calling the .Close method when you are done working with it, and next time when you need to work with it some more, like reading another record or writing to the database, you can call the .Open method. If that doesn't work, you can just avoid calling the close method altogether until you change records or leave the form.
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 07 12:43 PM
Off the record: I am very glad I have "only" 24 text fields on my form, so I have to paste the "ValidateIntegerEntry(key)" only 24 times in OnKeyPress event for each.
If I evet ger a request for a form with 50+ text fields with numerics in them - I'm givinig my 2 weeks notice right away
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 07 12:49 PM
hehe, I think a lot of us have made the declaration. And yet, I persist, allowing my plate of large daunting tasks to grow larger and larger...

Incidentally, I think you can get away with using on OnKeyPress function to handle all the events, if the fields are the same as far as what you'll allow.
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 07 3:01 PM
Here's a very weird question...

IS THERE A WAY to find which control has the focus when the forms closes? The reason is that I was just told to make sure that if user enters the data in the field and closes the MainView - data needs to be saved. And with my "dynamic" UpdateData procedure, I need to know the focused control's TabOrder.
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 07 3:09 PM
I haven't checked for focused fields when closing a form before, but I'm not sure that will help if the user updates more than one field while the form is open. I think you might want to add a dirty flag instead, called "blFormDirty" or something like that. When the form opens or is changed, set the flag to False, and anytime the OnKeyPress event is fired (and key isn't set to 0), set the flag to True. Then, when the form is closed, if the flag is set to True, save the recordset changes (or better yet, pop a message box asking if the user wants to save the changes).
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Dec 07 4:26 PM
Well, the definition I got were to save data as soon as user leaves the field, no questions asked
And apparently when from closes, it does not fire the "ExitControl" event
But I'll look into your suggestion, I think I can make it work
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Dec 07 2:58 PM
Ok, here is two more:
1. How do I disable the "Edit --> Delete" option for my custom MainView?
2. How can I assign a default group to the mainview (providing the group exists)?
[Reply][Quote]
Vladimir
Posts: 93
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Dec 07 4:12 AM
About disable "Edit --> Delete". In Global Script you have function:

Function OnBeforeFunctionExecute_EditDeleteItem(functionNumber, functionName)
Dim objMainView

Set objMainView = Application.MainViews.ActiveView
If Not (objMainView Is Nothing) Then
Select Case objMainView.BaseTable
Case "ACCOUNT" 'DNL
'Do Account Actions
Case "CONTACT" 'DNL
'Do Contact Actions
Case "OPPORTUNITY" 'DNL
'Do Opportunity Actions
Case "TICKET" 'DNL
'Do Ticket Actions
Case "CAMPAIGN" 'DNL
If Not DoCampaignActions(objMainView) Then
OnBeforeFunctionExecute_EditDeleteItem = False
End If
Case Else
'Do Nothing
End Select
End If

Set objMainView = Nothing
End Function

If you return False then "Delete" will not execute.
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Dec 07 10:43 AM
As for assigning the default group, you can do this per user, and the users can do it themselves as well. In the Administrator, open up a user profile, and click on the "Client Settings" tab. In the top right corner, you have the choice of setting up the default groups. First you select which main view you want to update, and then you select the group, and that will do it.
[Reply][Quote]
Leonid
Posts: 32
 
Re: Custom MainView does not display any formsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Sep 08 6:21 AM
Hi all.
Have same problems. I've solve most of the problem but mainview displays only first record in a table. I have groups, but can't see list view. I can't go to next record etc.
Any suggestions ?
[Reply][Quote]
 Page 2 of 2<< < Previous 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/25/2025 8:54:01 AM