Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Custom Screen - How to detect which toolbar button were pressed?

(0) ShareShare
ReportReport
Posted on by 1,090

I wanna emulate the process of "Release Now" like all screens that release a batch. When a user select Release Now on batch handling control, and press the save button, the screen just save the data. But when the user press the finish button the screen save the data and clean the screen like the new button does.

So, does anyone knows, what function o variable can I check to know if the user press the save or the finish button?

Thanks.

*This post is locked for comments

  • Verified answer
    Apps Mexico Profile Picture
    1,090 on at
    RE: Custom Screen - How to detect which toolbar button were pressed?

    Ready, just need to use the Update1.FinishEvent.

    Private Sub Update1_FinishEvent(ByVal Level As Short, ByVal Updated As Short, ByRef RetVal As Short) Handles Update1.FinishEvent
    If Level = LEVEL0 Then
    If bxAMHandling.BatchHandling = "R" Then
    Call Status(StartProcess, False, "", DISP_ONLY)

    Dim sqlQuery As String = "JM_sp_Pgm_BatchRelease" & SParm(bBatch.CpnyID) & SParm(bBatch.BatNbr) & SParm(bBatch.Module)

    Dim execCursor As Integer
    Call SqlCursor(execCursor, NOLEVEL + SqlNoSelect)

    Call sql(execCursor, sqlQuery)

    Call Status(StopProcess, False, "", DISP_ONLY)
    End If
    End If
    End Sub

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans