Skip to main content

Notifications

Microsoft Dynamics SL (Archived)

stopping the execution of batch process

(0) ShareShare
ReportReport
Posted on by 340

I have some custom validation when the user clicks the "Begin Processing" button on a batch process screen.  If the validation fails then I would like the batch process to stop processing the standard code.   Can someone please help me on that?

*This post is locked for comments

  • Verified answer
    Barry Flynn Profile Picture
    Barry Flynn 3,090 on at
    Re: stopping the execution of batch process

    The only way I know of to do this is some variation of the following

    - Shift the real Begin Processing button off the visible screen (ie set Left to -1000) and set TabStop to false

    - Add your own begin processing button.

    - When your button is pressed, do your validation.

    - If yiou want to proceed, programatically click the real button.

    THe last step can be the tricky one - I have found that sometimes it works and sometimes it doesn't.

    Two possible techniques are:-

                  sivmyapp.controls("The_Button_Name").value = true

    and

                   Call ApplSetFocus("The_Button_Name"")

                   Call SendKeys(" ",true)

    Barry

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans