Displaying a Progress Dialog for Client-Side Operations in the Infor CRM Web Client

If you’re doing some sort of operation where you’d like to display progress to the user, you can use the showProgessBar function in Sage.UI.Dialogs. You’ve likely seen this progress dialog before, such as when you’ve run a report in CRM. You can use that same dialog for your needs as well. There’s two ways to use the progress dialog, for a set/determined number of items, or for an indeterminate or unknown number of items.

The params for showProgressBar are passed as an object. The object can have the following properties:

  1. title: Title of the dialog
  2. message: (optional) Message to display on the dialog
  3. showmessage: true/false
  4. maximum: the max number of items (not needed if setting indeterminate=true)
  5. pct: the percentage for the progress (not needed if setting indeterminate=true)
  6. indeterminate: true/false
  7. height: (optional)
  8. width: (optional)

Showing for an Indeterminate Number of Items

If you don’t know how many “things” you’ll be showing progress for, you can just display it for an indeterminate count.

The code looks like this:

Sage.UI.Dialogs.showProgressBar({indeterminate: true, title: 'Test Progress', message: 'Doing something...', showmessage: true});

The progress dialog for indeterminate looks like this:

Then, to close the progress dialog when you’re done, you’d call closeProgressBar, like this:


Showing for a Determined Number of Items

If you do know the number of “things” to show progress for, you will call showProgressDialog for each update of the percentage. For example, start with this:

// set at zero percent (pct)
Sage.UI.Dialogs.showProgressBar({maximum: 100, pct: 0, title: 'Test Progress', message: 'Doing something...', showmessage: true});

That will display the following:

Now, each time you want to update the progress, you simply call that again, but this time with an updated pct (or percentage) value:

// set at 60 percent (pct)
Sage.UI.Dialogs.showProgressBar({maximum: 100, pct: 60, title: 'Test Progress', message: 'Doing something...', showmessage: true});

The progress will be updated:

You keep calling that as many times as you need, updating the progress (pct). When you’re done, you close it with the following:


That it, and you’ve ended up with a much nicer user experience. Keep in mind, this just works for client-side operations, such as doing things via SData, as I’ve mentioned previously.


Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!