By using this web site, you agree to all terms and conditions for acceptable use.

ServiceLedger KnowledgeBase Knowledgebase Home Page > ServiceLedger > Technical | Contact Us

Search the Knowledge Base Browse by Category

ServiceLedger provides this content as-is for self help support purposes. ServiceLedger assumes no liability for any steps you take based on the directions in our knowledge base, and assumes that you have the knowledge to determine whether a given step is appropriate for your situation. Certain solutions can affect third-party software that ServiceLedger relies on or integrates with; it is your responsibility to consult with the documentation or publishers of such third-party software to understand whether any changes suggested here will have negative effects on other applications.


[D](T0305) How do I add custom actions to ServiceLedger?

Would you like to...

Print this page
Email this to a friend

Introduction

ServiceLedger allows you to configure most windows with a variety of custom information, including custom fields, custom reports, and custom actions. This article discusses custom actions, which can be added to the Actions menu on most windows.

Custom actions allow ServiceLedger to perform an arbitrary command, possibly using information from the currently open record. Any ServiceLedger XML command can be run, but common commands include running reports, opening related records, and launching an external application.

Generally, the easiest and most efficient way to set up custom actions is to take advantage of our custom services and hire ServiceLedger to either perform or help you with a desired customization or integration. The knowledge below is intended to assist customers who are working with ServiceLedger to integrate or customize the application. However, you may also be able to use the directions below to perform your own integration.

Setup

Each custom action you wish to register can be added by creating a global preference that specifies the window (i.e. object) you want the action to show on, the title that should be shown in the dropdown menu, and the action that ServiceLedger should perform.

The option name is as follows:

object_name.custom.action.action_name

Where object_name and action_name should be replaced with the object and menu text you wish to use, respectively. Object names for common windows can be found at our schema guide. The menu text, i.e. action_name, should be in all lowercase and have underscores instead of spaces. However, the words will be capitalized and underscores replaced with spaces when this name is actually shown in SL.

The value of the above option specifies what action should be taken, given in ServiceLedger XML. The usual command is to launch an external program and send some identifying information to it, which can be accomplished through the <launch/> command, as shown below:

<launch command_line="arbitrary command line" launch_wait="false"/>

The command line can be anything that can be run at a typical windows command line. Typically, this will be a path to your custom executable and possibly some parameters that specify which record you're working with, e.g.:

<launch command_line="ClientManager.exe -client @client_id" launch_wait="false"/>

Anything in the command that is prefaced with an at symbol, such as @client_id above, will be replaced with the value of that field on the record you're running the custom action from assuming such a field exists on the table associated with that object. For example, when working with accounts, there will be a field called client_id in the client table, and when working with bills, there will be a field called bill_id on the bill table. For more information on windows, objects, and database fields, see our schema guide.

More advanced integrations are also possible by designing a program that can communicate with ServiceLedger via Interprocess XML. For more information on such integrations, please contact your ServiceLedger sales representative.


Related Questions:

Attachments:

No attachments were found.


ServiceLedger KnowledgeBase Copyright © 2019 support.serviceledger.com
Powered by AcitveKB Knowledgebase Software