Skip to Content
0
Jun 11, 2010 at 10:12 AM

"Action stopped by add-on (UI_API -7780) Message 66000-152"

950 Views

Hi Experts,

I need to validate form content in the OnBeforeFormDataAdd event. But system message "Action stopped by add on (UI_API 7780)" is showing all the time.

I'm using B1DE 2.1 to create the addon.

To create the addon project i am using SAP Business One 8.8, VS 2008 and B1DE 2.1.....

<B1Listener(BoEventTypes.et_FORM_DATA_ADD, true, New String() {"CCS_PDI"})>  _
        Public Overridable Function OnBeforeFormDataAdd(ByVal pVal As BusinessObjectInfo) As Boolean
            Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)
            'ADD YOUR ACTION CODE HERE ...

            If ValidateHeaderData(form) = False Then
                Return False
            End If

            Return True

        End Function

Public Function ValidateHeaderData(ByVal OForm As Form) As Boolean

 Dim txtCardCode As SAPbouiCOM.EditText = OForm.Items.Item("txtCrdCode").Specific

  If Trim(txtCardCode.Value) = "" Then
   B1Connections.theAppl.SetStatusBarMessage("Select a Business Partner", SAPbouiCOM.BoMessageTime.bmt_Short, True)
       txtCardCode.Active = True
       Return False
  End If

 Return True
End Function

Plese help me

Reagrds

Arun