on 09-14-2011 1:32 PM
Hi expert,
I am new in sap b1 and i am facing difficulty,so help me.
Q:How to disable and hide a form items when a form is loaded?
Actually, i am anable to find the instance of Items like Form,button
Regards
sanoj
Hi,
I Think You can only use enable option for that
Try This.....
oitem = oform.Items.Item("47")
oitem.Enabled = False
oitem = oform.Items.Item("148")
oitem.Enabled = False
Thanks
Shafi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanoj,
Try This......
' Dim oform As SAPbouiCOM.Form
Dim oitem As SAPbouiCOM.Item
oform = sbo_application.Forms.Item("Frm_Emp")
'disable a edit text
oitem = oform.Items.Item("oedit_empn")
oitem.Enabled = False
'to hide a edit text
oitem.Visible = False
Thanks
Shafi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shafi,
Thanks for relpy.
if (pVal.FormTypeEx == "143" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
{
SAPbouiCOM.Form oForm;
SAPbouiCOM.Item oItem;
oForm = Global.Application.Forms.Item(pVal.FormUID);
oItem = oForm.Items.Item("90");
oItem.Visible = false;
oItem = oForm.Items.Item("91");
oItem.Visible = false;
oItem = oForm.Items.Item("105");
oItem.Visible = false;
oItem = oForm.Items.Item("99");
oItem.Visible = false;
oItem = oForm.Items.Item("143");
oItem.Visible = false;
oItem = oForm.Items.Item("30");
oItem.Visible = false;
//Hide PaymentTerm
oItem = oForm.Items.Item("47");
oItem.Visible = false;
oItem = oForm.Items.Item("48");
oItem.Visible = false;
}
The above code work fine,but ItemUID 47 and 48 do not work.
the following code do not work
//Hide PaymentTerm
oItem = oForm.Items.Item("47");
oItem.Visible = false;
oItem = oForm.Items.Item("48");
oItem.Visible = false;
thanks
sanoj
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
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.