cancel
Showing results for 
Search instead for 
Did you mean: 

Add new check in form Business Partners in any folder

Former Member
0 Kudos

Hi all,

this a simple question, but i get never new field in folder in system form.

I get new custom field in form but no in folder.

Have you any idea?

Serema

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

In order to assign an item to a specific folder,

you need to set its FromPane & ToPane properties.

Folders in SAP Business One are actually buttons that changes the Form PaneLevel when clicked.

You should set your Item's FromPane & ToPane properties in order to determine on what PaneLevel they will be shown.

(Visible = True/ False according to PaneLevel)

Use the Debug to get your desired Folder PaneLevel.

Regards,

Yaniv G.

SDK Consultant,

SAP Manage Israel.

Former Member
0 Kudos

dear Yaniv,

Case et_CLICK

If (pVal.ItemUID = "156") Then

Set frm = applic.Forms(FormUID)

Set lItm = frm.Items

Set itms = lItm.Item("191")

itms.Visible = True

Set itm = lItm.Add("xChec", it_CHECK_BOX)

itm.Height = 19

itm.Left = itms.Left + 20

itm.Top = itms.Top

itm.Width = 65

itm.FromPane = 2

itm.Enabled = True

itm.ToPane = 2

itm.Visible = True

itm.Specific.Caption = "Fattura per ogni Consegna"

Set xEdit = itm.Specific

End If

itemUID od the 2^ Panel is 156.

When i clik this panel i add my checkbox, but isn't work, sorry....

Thank's Serema

Former Member
0 Kudos

Hi Serema,

in order to get your problem solved, you could take a look at the "ComplexForm" sample which has been provided by SAP. It shows all there is to know about adding folders, controls "on folders" etc.

I suggest that you add controls on the form_load event via action=update in your srf file.

Add your checkbox and set the from pane and to pane as needed.

The checkbox should get visible automatically when the form pane is switched.

But as I said before, the sample is all there and ready to be looked at.

HTH Lutz Morrien

Former Member
0 Kudos

Hi,

...

itm.FromPane = 2

itm.Enabled = True

itm.ToPane = 2

itm.Visible = True '// this value will be determine by the Form Pane level.. remove it

...

if it's still not working - verify again the PaneLevel you need (looks like it is not what you need)...

you can specify the exact form and folder and I'll place a sample specifically for you ..

Regards,

Yaniv G.

Former Member
0 Kudos

Hi yaniv and Lutz,

my code now work.

I read the example "ComplexForm" and i try with your good inputs, thanks a lots:

my code, for the people that has the problem as me:

Case et_ITEM_PRESSED:

If (pVal.ItemUID = "156") Then

Set frm = applic.Forms(FormUID)

If (frm.Mode = fm_ADD_MODE) Then

frm.PaneLevel = 6

frm.Visible = True

Set lItm = frm.Items

Set vCheck = frm.DataSources.UserDataSources.Add("uCheck", dt_LONG_TEXT, 20)

Set itms = lItm.Item("120")

Set itm = lItm.Add("xChec", it_CHECK_BOX)

itm.Height = 19

itm.Left = itms.Left

itm.Top = itms.Top + 30

itm.Width = 120

itm.FromPane = 6

itm.ToPane = 6

itm.Specific.Caption = "Fattura per ogni Consegna"

Set xEdit = itm.Specific

xEdit.DataBind.SetBound True, "", "uCheck"

xEdit.Checked = True

frm.Items("156").Update

BubbleEvent = False

End If

Best regards

Serema

End If

Answers (0)