Plugin Development Kit

For System Administrators

WORKFLOW > TEAMLEADER PLUG-IN

see also

Customization

The free Plug-in Development Kit allows for extensive programming of the Custom tab of a TeamLeader task, using ActiveX technologies and Visual Basic 6 as a programming language. The kit is comprised of a template VB application, and instructions for using the plug-in template. The following two files are most important:

·   TLForm.vbp - The VB project file template. The project is already set up to produce an ActiveX control that can be used by TeamLeader

·   TLForm.ctl - The VB custom tab template. This file defines the look and feel of a custom plug-in. This file initially defines a blank form with no functionality.

 

You can add additional tabs to the TeamLeader Task form by creating a custom ActiveX control using the Plug-in Development Kit template. You can create as many plug-ins as you like using VB (not included with TeamLeader.

Creating a TeamLeader plug-in:

1.    Copy the contents of C:\Program Files\Virtual Global\TeamLeader\PluginKit (assuming a default installation) to a development folder where you can create your custom plug-in.

2.    Open the file TLForm.vbp with Visual Basic 6.

a.    In VB, go to PROJECT > TL_FORM PROPERTIES, and change the name to a new project name.

b.    In the VB Project Explorer, change the user control’s name property from TLFORM to a new name (for example, F_Voip).

c.     In VB, go to FILE > MAKE TLFORM, you may also change the executable to the same name and compile.

d.    Make note of the new Project Name and User Control Name.

Testing the Plug-in:

1.    Compile your Plug-in.

2.    In TeamLeader, go to Workflow > TeamLeader Plug-in.

images\team0071.jpg

3.    Enter the User Control Name to the VB Form Name field, and Project Name to the VB Project Name field. Select "Add to Toolbox" button and choose an icon for the control (icon size should be 32 * 32 pixels). If you have configured the control successfully, the control will appear on the Collaboration Toolbox..

 

images\team0070.jpg

 

You are now ready to customize your control.

Components can be added directly to the TLForm user control using the VB form designer. Modifications to functionality are programmed under the Let Action property of the TLForm user control by responding to changes to the Action property.

Working with Data:

The custom tab is usually used to capture task specific information that exceeds the general task information captured by TeamLeader This is best done by creating a new database table (the Associated Table) that uses the exact same record key as TeamLeader to identify a unique task -- specifically SCR_NUMBER. The two tables will have an implied one-to-one relationship in the database.

Responding to ACTION property values:

1. EDIT

Indicates that the custom tab is visited for the specified task. If you are working with a data source, this is the best time to create and/or open the corresponding record in the Associated Table for modification. To do so, you will use either the ADDNEW or EDIT recordset methods for your table's recordset.

 

Sample code may look something like:

Data1.Recordset.FindFirst (SCR_Number = & m_SCR_NUMBER)

If Data1.Recordset.NoMatch Then

Data1.Recordset.AddNew

Text1 = m_SCR_NUMBER

Else

Data1.Recordset.Edit

End If

2. SAVE

Call the UPDATE method here.

3. EXIT

Alerts your control that the user is leaving the TeamLeader task.

4. DISABLE or ENABLE

Alerts your control that the task can (or cannot) be modified.

 

Installing your Plug-in:

1.    In TeamLeader, go to Workflow > TeamLeader Plug-in.

2.    Enter the User Control Name to the VB Form Name field, and Project Name to the VB Project Name field. Select "Add to Toolbox" button and choose an icon for the control (icon size should be 32 * 32 pixels). If you have configured the control successfully, the control will appear on the Collaboration Toolbox.

3.    You can add the plug-in to a task by navigating ATTACH -> ADD TEAMLEADER PLUGIN from the Task Form. Once attached to a task, you can save the task as a template so that subsequent creations of that task include the plug-in.

 

Making Plug-in Data Available for Searching

The TeamLeader Administrator can use System Options to make specific tables available to the user for searching using the ‘Find’ functions in conjunction with plug-ins attached to specific tasks.