Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

VBA Reject Line

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
I've added fields to a window using VBA. I want to filter records in a scrolling window based on what is entered in those fields using VBA reject line on the Before Line Populate event. The code works fine but it takes 20-30 seconds to filter on a small range of records(80) but we could have a range of 4000 or so. Is there another way this can be accomplished that can speed up the process?

*This post is locked for comments

  • soma Profile Picture
    soma 24,410 on at
    RE: VBA Reject Line

    I am with above idea for your requirement. But, I think this will take few more seconds to complete the process.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: VBA Reject Line

    Thanks for the responses.  I have 10+ years experience using Dex and have dabbled in VBA.  I would love to use Dex but the window I am working with is a third party window.  I needed to add new fields to this window as additional filters therefore Dex is not an option.  I know I can filter 3rd party tables using the anonymous table found in Pushing the Limits of Dex so I my thoughts now is to create a new dex table, populate the table with my new filter fields using VBA script prior to the scrolling window populating, and then use the data in this table in a dex trigger to filter the records....unless someone else has another idea?

  • L Vail Profile Picture
    L Vail 65,271 on at
    RE: VBA Reject Line

    Soma, again, is correct. I write this just to add emphasis to what he said. The reject script is a slow way to filter. While it's cool that you can do it, I rarely use it in production because of the poor performance. Dexterity is, in my opinion as well, the only efficient way to do it.

    Dexterity may seem daunting to begin with, but if you are comfortable using Modifier with VBA, you will not have a problem with Dexterity. Heck, I can do it :) and I started my GP life as an accountant. Not to push my own book (though I am), I've got a small project in it where you can walk through and actually create an 'application' that integrates with GP. Opening GP lookup windows, and putting filters on those windows is included in this mini project. Here's a link to the publisher -  www.packtpub.com/.../book

    You might like Dexterity more than you think. You might even convert all of your VBA code to Dex! If it's in Dex, it will work in the new Web client, VBA will not.

    Kind regards,

    Leslie

  • Suggested answer
    soma Profile Picture
    soma 24,410 on at
    RE: VBA Reject Line

    I think if you use reject line script to populate the script on before original, the 20-30 seconds is not a worst performance. If you want to increase the speed of the process, try the same to create in Dexterity.

    Hope this helps!!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,387 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans