Skip to Content
author's profile photo Former Member
Former Member

Form -- Invalid Form use Navigate Menu

Dear All,

I am using SAP Business one studio . I am getting "Form Invalid Form" Issue when Click MoveFirstRecord(1290). On first time , it works, from second time on wards i am getting this error.

I set flag variable for Open and Close

Code in item event.

beforeaction = true

Case SAPbouiCOM.BoEventTypes.et_FORM_CLOSE

flag = 1

On the second time , First Form Load event Trigger

beforeaction = False

Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD

oForm = SBO_Application.Forms.Item(FormUID)

oItem = oApplication.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)

Case SAPbouiCOM.BoEventTypes.et_FORM_VISIBLE

If flag = 0 Then

add DocEntry

Enable some Menus(like Navigator Menu)

END If

In Menu Event

menu Id 1290

If flag = 0 Then

oForm.Freeze(True)

If Not String.IsNullOrEmpty(EditText0.String) Then

oForm.EnableMenu(AddDocument, True) '' To Enable Add Document Menu When user click Navigation Menu

Matrix0 = oForm.Items.Item("OMatrix").Specific

FillData(Matrix0)

oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE

ChangeButtonCaption()

End If

oForm.Freeze(False)

ElseIf flag = 1 Then

oForm.Freeze(True)

If Not String.IsNullOrEmpty(EditText0.String) Then '' Getting Error

oForm.EnableMenu(AddDocument, True) '' To Enable Add Document Menu When user click Navigation Menu

Matrix0 = oForm.Items.Item("OMatrix").Specific

FillData(Matrix0)

oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE

ChangeButtonCaption()

'End If

oForm.Freeze(False)

End If

Catch ex As Exception

Message(ex.Message, SAPbouiCOM.BoStatusBarMessageType.smt_Error)

End Try

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 15, 2016 at 03:41 PM

    where is your oForm declaration variable? where do you set the oForm variable?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.