Skip to main content

Notifications

Microsoft Dynamics SL forum
Answered

stopping the execution of batch process

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?

  • 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans