cancel
Showing results for 
Search instead for 
Did you mean: 

Sub folder uder one folder

Former Member
0 Kudos

Hi,all

i want a foder under folder how we will set pane level property.

By

Firos.C

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Check the below threads, they will be of help,

Vasu Natari.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Check the following sample from the SAP Note...

Follow the process described below in order to create subfolders via SAP Business One UI API AddOn:

'// Add a user data source to the form:
oForm.DataSources.UserDataSources.Add "FolderDS",dt_SHORT_TEXT,1
'// Add new subfolder item(s) to a folder on the form.
'// Use an existing item to position the new subfolders
'// on the form.
Set oNewItem = oOrderForm.Items.Add("Folder" & i, it_FOLDER)
Set oItem = oOrderForm.Items.Item("62")
oNewItem.Left = oItem.Left + (i - 1) * 100
oNewItem.Width = 100
oNewItem.Top = oItem.Top
oNewItem.Height = 19
'// Set the subfolder's Pane Level.
'// The FromPane should be the pane level of the parent folder
'// or lower
oNewItem.FromPane = 10
oNewItem.ToPane = 15
'// Items with FromPane=0, ToPane=0 will be visible on any pane
'// level set to the form.
'// For example:
'// Item1 (FromPane=1, ToPane=1)
'// Item2 (FromPane=2, ToPane=2)
'// Item3 (FromPane=0, ToPane=0)
'// Setting form PaneLevel to 1 results in Item1 and Item3
'// visible on the form.
'// Set folder caption
Set oFolder = oNewItem.Specific
oFolder.Caption = "Folder " & i
'// Bind the Folder to a new User Data Source
oFolder.DataBind.SetBound True, "", "FolderDS"
'// Set the focus to the first folder
If i = 1 Then oFolder.Select
'// Group a folder with the previous one.
'// This allows the form to display one folder at a time.
If i > 1 Then oFolder.GroupWith ("Folder" & i - 1)

Catch the ItemEvent to adjust item properties to add Items to specific folders by setting visibility on Item Event.

'// When the new folder is clicked change the form's pane level.
'// By doing so your items will appear on the new folder
'// assuming they were placed correctly and
'// their pane level was also set accordingly
If pVal.EventType = et_ITEM_PRESSED
And pVal.ItemUID = "UserFolder" Then
oOrderForm.PaneLevel = 10
oOrderForm.Items.Item("Folder1").Specific.Select
oOrderForm.Items.Item("OpBtn3").Visible = False

Hope it helps,

Vasu Natari.

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

There is a blog talking about it.

/people/lisa.mulchinock/blog/2009/06/19/how-to-create-new-folderstabs-via-the-ui-api

Hope it helps

Trinidad.

former_member682029
Contributor
0 Kudos

Firoz

I think you have created all the folders using screen painter.

You have to create the sub folders programatically. Then only this will work.

So create the parent folders using screen painter. Using code, just group them.

After that create sub folders and group them. This will work fine.

Anoop