web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to customize 'finish' button on Voucher And Adjustment entry?

(0) ShareShare
ReportReport
Posted on by 5

Hi,

On form 03.010.00 (Voucher Adjustment Entry), How to customize 'finish' button on the toolbar after handling selected to 'Release Now'?

For instance i wanted to update GLTran table.

pastedimage1587717130800v1.png

I have the same question (0)
  • CFROTON Profile Picture
    4,710 on at
    RE: How to customize 'finish' button on Voucher And Adjustment entry?

    Hello,

    I don't see that you can customize that button with Customization manager, perhaps someone with knowledge of VB Tools/SDK can help you in this forum. I also think that it's a global button as most process screens have 'Finish"

    Best Regards,

    Jana MacDonald

    Dynamics Support

  • Suggested answer
    Apps Mexico Profile Picture
    1,090 on at
    RE: How to customize 'finish' button on Voucher And Adjustment entry?

    Hi,

    If you want to execute a process after that the batch is released you can use the OnFinish (32000) level on Update1_OnUpdate event. In other hand if you want to add a validation when the user select the Release now option you can use the _Chk event of the control, see the example that I use on 04.010.00 screen.

    Private Sub Update1_OnUpdate(Level As Integer, InsertFlg As Integer, retval As Integer)
        Select Case Level
            Case 0
                .....
            Case 1
                .....
            Case 32000
                Call ObtieneCamposLlave
                serr_xFEAPDoc = SqlFetch1(CSR_xFEAPDoc, "xsp_xFEAPDoc_All" & SParm(bxFEAPDoc.CpnyId) & SParm(bxFEAPDoc.BatNbr) & SParm(bxFEAPDoc.RefNbr) & SParm(bxFEAPDoc.DocType), txFEAPDoc, LenB(txFEAPDoc))
                If serr_xFEAPDoc = NOTFOUND Then
                    Call SInsert1(CSR_xFEAPDoc, "xFEAPDoc", bxFEAPDoc, LenB(bxFEAPDoc))
                Else
                    Call SUpdate1(CSR_xFEAPDoc, "xFEAPDoc", bxFEAPDoc, LenB(bxFEAPDoc))
                End If
        End Select
    End Sub

    Private Sub cbatchandling_Chk(ChkStrg As String, retval As Integer)
        If ChkStrg = "B" Or ChkStrg = "R" Then
            
            serr1 = MFirst(MH_POTran, MH_POTran_Flag)
            While serr1 = 0
                Call ObtieneCamposLlave
                
                serr_xAMActivoFijoValida = SqlFetch1(CSR_xAMActivoFijoValida, "xsp_xAFActivoFijo_ValidaRegistros" & SParm(vRcptNbr) & SParm(vLineRef), bxAMActivoFijoValida, LenB(bxAMActivoFijoValida))
                If serr_xAMActivoFijoValida = 0 Then
                    If bxAMActivoFijoValida.RcptQty <> bxAMActivoFijoValida.TotalRegistros Then
                        Call MessBox("El total de series registradas " & CStr(bxAMActivoFijoValida.TotalRegistros) & " , para la linea " & vLineRef & " es diferente a la cantidad recibida " & CStr(bxAMActivoFijoValida.RcptQty), MB_ICONEXCLAMATION, "ERROR")
                        retval = ErrNoMess
                        Exit Sub
                    End If
                Else
                    serr_xAFActivoFijoInfo = SqlFetch1(CSR_xAFActivoFijoInfo, "xsp_xAFActivoFijoInfo_All" & SParm(vCpnyId) & SParm(vInvtId), bxAFActivoFijoInfo, LenB(bxAFActivoFijoInfo))
                    If serr_xAFActivoFijoInfo = 0 Then
                        Call MessBox("No se han registrado las serires de los activos para la linea " & vLineRef, MB_ICONEXCLAMATION, "ERROR")
                        retval = ErrNoMess
                        Exit Sub
                    End If
                End If
                serr1 = MNext(MH_POTran, MH_POTran_Flag)
            Wend
            serr1 = MFirst(MH_POTran, MH_POTran_Flag)
        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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,047

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 885 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 592 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans