11/27/2024 6:23:55 AM
|
|
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!
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.
|
|
|
|
Window Refresh Issue
Posted: 14 Mar 07 2:25 PM
|
fiogf49gjkf0d Hey everyone; I have an issue where the SLX window isn't refreshing because it is processing a script in the background.
The background: I have a tab that allows certain users to open a file and import the contents into tables in SLX. There is a progress bar on the tab which I want to show the progress as it works down through the lines of the file (cvs). The problem is that during the processing, it locks SLX - windows reports, via the SLX Title Bar, that SLX is not responding when attempting to click some other location on the screen. Oddly, if you start the process, but do not click anywhere else, you can see the bar filling up. SLX has no crashed, or caused an error - it is just terribly busy.
This isn't a huge issue because this functionality is restricted to only a few people who understand that it is truly importing the data, despite the lack of response. However, it would be nice to know how to get this working, if at all possible.
I have tried a few things like frmWhatever.Refresh but nothing seems to work. Ideas?
Thanks! |
|
|
|
Re: Window Refresh Issue
Posted: 14 Mar 07 3:16 PM
|
fiogf49gjkf0d The SLX equivalent to something like VB's DoEvents (which forces the app to break to process queued windows messages) is:
Application.BasicFunctions.ProcessWindowMessages
Calling this in your loop will allow SLX to remain responsive, although it will slow things down for your import. |
|
|
|
Re: Window Refresh Issue
Posted: 14 Mar 07 5:08 PM
|
fiogf49gjkf0d Ryan has the answer but here's some food for thought. What about creating a .NET extension in 7.0? This could possibly give your import a non-modal behavior where users can actually go about doing their business but your .NET extension is there importing in the background on whatever bandwidth it can muster.
ProcessWindowMessages will keep SLX responsive in look only though. You won't be able to go to an Account or do some other task while the import is performing. It'll just appear as if it's doing work instead of halting (which in fact it really is doing, but appearances are everything in this business). |
|
|
|
Re: Window Refresh Issue
Posted: 15 Mar 07 8:38 AM
|
fiogf49gjkf0d Hey guys, thanks for the replies (quick ones too!)
Ryan, that call works like a charm.
Jeremy, sadly, we are using SLX 6.2.6, so I do not think that option is available for me. Perhaps some other person that reads this thread can do that though. Maybe I could move it to a COM object? Moving it outside of SLX probably isn't worth the time/effort because as I mentioned previously, this functionality isn't available to the general user. There will be about two or three people, at most, that will need to run this import once a quarter - the person running it will more than likely be myself. Regardless, thanks for the thoughts and suggestions! |
|
|
|
Re: Window Refresh Issue
Posted: 18 Mar 07 12:13 PM
|
fiogf49gjkf0d Jeremy, I actually just tried this (creating a .net extension in 7.0) and calling it from my vb script. However, I found that it does the same thing. I really can't do anything within saleslogix while the .net extension is processing. Is there something special that need to be done (start a new thread or something)? |
|
|
|
Re: Window Refresh Issue
Posted: 18 Mar 07 1:15 PM
|
fiogf49gjkf0d Using a .NET Extension won't do this for you automatically. However, you can start the process on another thread easily in .NET - somehting you can't do in a SLX script.
ie:
using Sage.SalesLogix.NetExtensions; using System.Threading; //... public class Class1 : BaseRunnable { public override object Run(object[] Args) { Thread t = new Thread(new ThreadStart(this.myLongRunningProcess)); t.Start(); } private void myLongRunningProcess() { // do a lot of processing here } }
Make sense? |
|
|
|
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!
|
|
|
|
|
|
|
|