Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
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: Auto Logoff
Fajar
Posts: 32
 
Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jul 06 8:58 PM
fiogf49gjkf0d
Hi all it's me again,

is there any way to force logoff for user that still login to saleslogix and do nothing a.k.a iddle
after a time period.

thx,
-Fajar
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jul 06 8:05 AM
fiogf49gjkf0d
My first suggestion would be to add a timer to the main form. If x period of time passes without any activity start the shutdown process.

John G.
[Reply][Quote]
Fajar
Posts: 32
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jul 06 10:57 PM
fiogf49gjkf0d
Thx for ur reply,

But i still have several questions to ask. My questions are:
1. How can i know that the user is doing some activity or being idle while he/she was still login in the saleslogix.
2. How can i shutdown the saleslogix client using script.

thx,
-Fajar
[Reply][Quote]
Todd Hardin
Posts: 43
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Jul 06 2:54 PM
fiogf49gjkf0d
I am not sure how you woudl detect inactivity. For all MainViews you could do something where you update an lastActiveDateTime stamp SLXGlobal variable, but various features of SLX would not trigger this.

You could post a dialog with a Count down till auto-logoff, thus giving the user a chance to cancel your auto-logoff.


Timmus (Tim Agersea) came up with this originally.

Use the new SLX GlobalScript. You can create a TimerObject by using CreateObject and referencing the SLXControls COM objects exposed by SLXControls.ocx

The timer would then use application.quit

Note that application.quit was defective in some versions of SLX so you should test. I believe someone else may have discovered that you can use an older SLX Function Execute to achieve a "File|Exit"

Todd Hardin
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jul 06 5:48 AM
fiogf49gjkf0d
Take this scenario:
Say I take a call that lasts 30 minutes to an hour, which should be rare. I've already got SalesLogix open with the appropriate ticket or activity on my screen but I'm letting the customer vent, talk about their dog, or whatever and after the call I'll put in a summary of what we talked about. If in the middle of all of this SalesLogix closes on me I'm NOT going to be a happy camper. I would have forgot everything they said in the time it took me to open SalesLogix and mentally remember the place I was just at (since SalesLogix history does not cross application start/stop boundaries).

This has a chance to blow up in everyone's face if you're not careful so at best I would try to devise a way of determining true activity. From there you can determine if the various levels of inactivity among groups are justified or not. Then introduce a system to only those people who are the worst among the group, as a sort of light punishment. Now the CEO isn't going to be mad that SalesLogix mysteriously closes on them because you focused on people that really should be "living" SalesLogix, not a blanket "You better use this system or not be in it" approach.


If people being in SalesLogix at night when the SQL backup routine is a problem, just develop a customization where you can set a predetermined time and use one of the methods Todd describes to kick everyone off the system "safely". You could even develop an external app to handle this on client machines, since it's not difficult to use the SalesLogix client COM object to connect to the existing SalesLogix instance and shut it down.
[Reply][Quote]
Todd Hardin
Posts: 43
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jul 06 1:08 PM
fiogf49gjkf0d
Good scenarios Jeremy, and I could not agree more about being cautious about implementing something like this.

I was thinking that rather than immediately shut someone down, you post a dialog box with an "Inactivity Warning" and count down timer. If the user respond they re-set the entire process, if they do not respond then we assume they are not present and you shut down.

I'm not 100% sure this will work given some occasional odd behaviour of modal dialogs in SLX - but just trying to think/speculate outside the box.

Todd
[Reply][Quote]
Fajar
Posts: 32
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jul 06 11:22 PM
fiogf49gjkf0d
thx for all the reply,

You were right Mr Hardin, the application.quit causes error. But the function File:Exit does work nicely.

I'm really sorry for my insufficient of knowledge, but is there anyone here that can give me some
tutorial about how to use the global script *to execute it*. I've tried but to no avail, the slx client
doesn't call it.

-Fajar
[Reply][Quote]
Fajar
Posts: 32
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jul 06 11:26 PM
fiogf49gjkf0d
thx for all the reply,

You were right Mr Hardin, the application.quit causes error. But the function File:Exit does work nicely.

I'm really sorry for my insufficient of knowledge, but is there anyone here that can give me some
tutorial about how to use the global script *to execute it*. I've tried but to no avail, the slx client
doesn't call it.

-Fajar
[Reply][Quote]
Fajar
Posts: 32
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Jul 06 3:50 AM
fiogf49gjkf0d
upss... sorry,

for replying twice with the same content *i clicked post twice, because of the internet connection*

i've just realized that the global script only called once when the application started. That's why
there were nothing happens when i refreshed it using ctrl-F5. i must close it first and then start it
again.

Todd Hardin:
"You can create a TimerObject by using CreateObject and referencing the SLXControls COM objects exposed by SLXControls.ocx"

1. What's the name of the timer object. I found a lot from the internet but none running well, it said that
the class string is not valid bla....
2. How can i reference the slxcontrols com?

Anyway, i use the TTimer object from the slxcontrol and found that the timer event triggered
the event twice after it reached the interval time. Is there something wrong??

I'm sorry if my questions seem to stupid for u, slx guru.

-Fajar
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Auto LogoffYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Jul 06 4:43 PM
fiogf49gjkf0d
Using the Application COM object is something like this: CreateObject('SalesLogix.SlxApplication') so if I had to guess the timer would be something like SalesLogix.Timer but I'd probably be wrong since I could never figure out how COM naming worked. I do have a component inspector in SharpDevelop I whip out that is like searching for a needle in a haystack and it suggests that it could be SLXControls.Timer but that may be wrong too.

The global script Application_Logon section will fire once and this is where you put the TimerStart routine that sets up the timer. You would then make a TimerElapsed routine that handles what happens when the timer has been reached. This would check for inactivity and display the "We're about to close your connection" message or just continue about it's business if it detects that SalesLogix has been used.

I suggest sprinkling Application.BasicFunctions.ProcessWindowMessages in numerous places and also choosing a very high interval rate like 30 minutes or an hour. If you set it for 10 minutes and your routine takes a minute to process (while they're currently USING the system mind you) they are going to notice that slowdown and not be happy. People can live with it bogging down to a point but you can easily turn this into something that processes the entire time they are in SalesLogix, making their 100% productivity in a normal environment something like 80-70% or less. It'd be like going back to 4.0 in terms of speed and that environment was S L O W.
[Reply][Quote]
 Page 1 of 1 
  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 © 2024 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): 11/26/2024 8:48:49 AM