Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here
DynDeveloper.com

DynDeveloper.com

Sign Up Now!Log In
J0orge 11/15/2010 2:20:11 PM

Preventing a grid line from being entered

Greetings, I have a problem right now, I am capturing the LineLeaveBeforeOriginal and want to validate some fields, so if it doesn't pass my validations, then I prevent it from jumping to the next line, the problem is that it isnt't behaving the way I was expecting it to, it still go to the next line even though I put the cancelevent to true: This happens in GPAddin:

Sub Initialize()
Implements IDexterityAddin.Initialize
AddHandler Microsoft.Dexterity.Applications.Dynamics.Forms.SopEntry.SopEntry.LineScroll.LineLeaveBeforeOriginal, _ AddressOf SaltoLineaValidar
End Sub
Private Sub SaltoLineaValidar(ByVal sender As Object, ByVal e As ComponentModel.CancelEventArgs)
'Valido que se halla llenado el tipo de venta antes de hacer el salto
Dim oCapaDatos As New CapaDatos
If Dynamics.Forms.SopEntry.SopEntry.SopType.Value = 4 Or _ Dynamics.Forms.SopEntry.SopEntry.SopType.Value = 5 Then
If Not oCapaDatos.ExisteTipoVenta(Dynamics.Forms.SopEntry.SopEntry.SopNumber.Value, _ Dynamics.Forms.SopEntry.SopEntry.SopType.Value) Then
Windows.Forms.MessageBox.Show("No ha llenado el tipo de venta, Ingreselo y vuelva a ingresar la fila para asegurar su correcto precio.") e
.Cancel = True
End If
End If
End Sub

Does anybody knows what Im doing wrong? Thanks in advance

Version: Unknown or N/A
Section: Visual Studio Tools for Dynamics GP








Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables