on 02-12-2016 11:36 AM
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
where is your oForm declaration variable? where do you set the oForm variable?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.