Skip to Content

We will go through a number of small samples in this blog to provide you with the information you need to create your own folders.

Example 1: Adding a new folder to a Sales Order Form

1. Connect to the UI (or use Single Sign On)

2. Open the ItemEvent and add the following code which will:

a. Access the Sales Order form

b. Catch the form load event of the Sales Order

c. Add a folder using the Item Type it_FOLDER. In this case we have created the new folder based on an existing folder (Accounting) so we copy the values top, height, width and left. We also put it next to the Accounting tab by using the GroupWith property.

d. When the form loads it then sets the focus back to the first folder (Pane level 1) which is the Contents tab.

3. Add another event in the Item event that will put the focus on the new tab when it’s clicked on.

 

image

image

In Business One this is how your new folder will appear in the Sales Order:

image

Example 2: Adding an item to the new folder on the Sales Order Form

In the above sample we can see that when we create the new empty folder we call a method called AddItemsToOrderForm which is the method we use in this example to add the items to our new folder:

1. Decide what type of items you want to add to the new folder

2. Use an existing item on an existing folder to place the new items on the new folder

3. Most importantly assign the ToPane and FromPane and this will determine on what folders these items are visible on.

 

image

In Business One this is how the new items will appear in the User Folder:

image

Example 3: Adding 4 subfolders within the new folder on the Sales Order form

We are going to now add 4 subfolders to the new folder we added to the Sales Order form and add some item types. We will also demonstrate how to make them visible on certain folders.

1. Add a new User Folder as highlighed in Example 1

2. Add 4 new Folders to the User Folder like we do with the Checkboxes in Example 2:

 

image

3. For all Item types you add ensure you set the correct PaneLevel. If you wish your new items to be visible in all 4 new subfolders it will look like this:

image

If you wish an item to be visible on the first two folders then the FromPane will be 10 and ToPane 12.

4. Finally we catch the Item pressed event on each of the new folders:

 

image

In Business One this is what appears when clicking on Folder 4:

image

 

Our next blog will cover the topic of how to solve errors you get when connecting to the DI API or DTW. So catch you then ๐Ÿ™‚

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member
    Hi Lisa,

    Hi,

    There are plenty of pane level literals throughout your examples: 1, 5, 10 to 14, etc.

    How do you arrive at these literals?

    Thx,

    -Luk-

    (0) 
    1. Former Member Post author
      Hello Luk,

      1 is the Contents folder/tab. When the Sales Order form loads i create a new folder (User Folder) and then put the focus back on Pane 1 (Contents)
      5 is a typo and should be commented out so ignore this value.

      10 is the value i assign the User Folder
      11 is Folder1
      12 is Folder2
      13 is Folder3
      14 is Folder4

      For the user defined folders/tabs you can set any number you wish to them – i just used 10-14 for ease of use. You then use this values to determine what user controls will be visible on which pane (using the FromPane and ToPane).

      I hope this makes it clearer.

      Cheers,
      Lisa

      (0) 

Leave a Reply