Technical

Definitions

A LIP Package

A LIP package is a zip file containing all required resources to install the included components. LIP packages could be created by the LIP Package Builder or manually if you create a lip.json file. If you create a manual file, make sure to save it with the encoding "Western (Windows 1252)", to avoid trouble with localization records.

Versioning

Package Versioning

This is only applicable for when you use LIP for add-ons or other premade packages that you want to keep version control of. If you use LIP as a deployment tool, then versioning doesn't matter that much.

Packages should adhere to semantic versioning, example 1.0.0 or MAJOR.MINOR.PATCH. Please read this.

Simplified:

  • MAJOR: Breaks backwards compatibility
  • MINOR: Adds new features but backward compatible
  • PATCH: Bugfixes

Dependencies

It is possible to specify a dependency on another LIP package. This must be done manually in the lip.json file as shown in the example shown below. The only way this works is by adding a dependency to a LIP package that is published in the Lime Store service.

Reference

lip.json

An example of what the file lip.json could look like:

{
    "uniqueName": "[A UNIQUE NAME OF PACKAGE ONLY CONTAINING a-z]",
    "createdWithLIPPackageBuilderVersion": "3.0.0",
    "addonVersion": "1.0.0",
    "dependencies": {
        "vba_json":"",
        "addon-lime-core":""
    },
    "install": {
        "localize": [
            {
                "owner": "checklist",
                "context": "title",
                "sv": "Test",
                "en_us": "Test",
                "no": "Test",
                "fi": "Test"
            },
            {
                "owner": "checklist",
                "context": "description",
                "sv": "A short description",
                "en_us": "A short description",
                "no": "A short description",
                "fi": "A short description"
            }
        ],
        "vba": [
            {
                "relPath": "vba\\Test.bas",
                "name": "Test"
            }
        ],
        "tables": [
            {
                "name": "test",
                "localname_singular":
                {
                    "sv": "Test",
                    "en_us": "Test"
                },
                "localname_plural":
                {
                    "sv": "Test",
                    "en_us": "Test"
                },
                "attributes": {
                    "tableorder": "3",
                    "invisible": "2",
                    "descriptive":"[test].[title]",
                    "syscomment": "My comment",
                    "label": "15",
                    "log": "1",
                    "actionpad": "lbs.html"
                },
                "fields": [
                    {
                        "name": "title",
                        "localname": {
                            "sv": "Titel",
                            "en_us": "Title"
                        },
                        "attributes": {
                            "fieldtype": "text",
                            "limereadonly": "1",
                            "invisible": "0",
                            "required": "1",
                            "width": "3",
                            "height": "1",
                            "length": "256",
                            "defaultvalue": "Lund",
                            "limedefaultvalue": "Application.ActiveUser.Record.Id",
                            "limerequiredforedit": "0",
                            "newline": "2",
                            "fieldorder": "4",
                            "isnullable": "0",
                            "type": "1",
                            "relationtab": "1",
                            "syscomment": "My private comment",
                            "formatsql": "0",
                            "limevalidationrule": "My validation rule",
                            "label": "18",
                            "adlabel": "31"
                        },
                        "separator": {
                            "sv": "Testseparator",
                            "en_us": "Test separator"
                        },
                        "limevalidationtext": {
                            "sv": "Min valideringstext",
                            "en_us": "My validation text"
                        },
                        "comment": {
                            "sv": "Min kommentar",
                            "en_us": "My comment"
                        },
                        "description": {
                            "sv": "Min beskrivning",
                            "en_us": "My tooltip"
                        },
                        "options": [
                            {
                                "sv": "Alt 1",
                                "en_us": "Alt 1",
                                "key": "alt1",
                                "color": "65535",
                                "default": "true"
                            },
                            {
                                "sv": "Alt 2",
                                "en_us": "Alt 2",
                                "key": "alt2",
                                "color": "255"
                            }
                        ]
                    }
                ]
            }
        ],
        "relations": [
            {
                "table1": "company",
                "field1": "person",
                "table2": "person",
                "field2": "company"
            },
            {
                "table1": "business",
                "field1": "responsible",
                "table2": "coworker",
                "field2": "business"
            }
        ]
    }
}

localize

Here you can specify records to be added to the localize table in Lime CRM. An example:

"localize": [
    {
        "owner": "checklist",
        "context": "title",
        "sv": "Test",
        "en_us": "Test",
        "da": "Test",
        "no": "Test",
        "fi": "Test"
    },
    {
        "owner": "checklist",
        "context": "description",
        "sv": "A short description",
        "en_us": "A short description",
        "da": "A short description",
        "no": "A short description",
        "fi": "A short description"
    }
]

vba

Here you can specify VBA-modules (Forms and Class Modules are also supported) that should be installed. Please note that the VBA-file MUST be included in the zip file of your package under the subfolder vba. Please specify the relative path to the VBA file and the name of the VBA module. When adding forms, please include both form-files (.frm and .frx) and specify the .frm-file in "relPath". Example:

"vba": [
    {
        "relPath": "vba\\MyForm.frm",
        "name": "MyForm"
    },
    {
        "relPath": "vba\\MyClassModule.cls",
        "name": "MyClassModule"
    }
]

tables

name (mandatory)

Database name of the table. Example:

"name": "goaltable"
localname_singular (mandatory)

Localnames in singular. Each line in this node should represent one language. Valid languages are all languages Lime CRM supports. Example:

"localname_singular": {
"sv": "MÃ¥ltabell",
"en_us": "Goal table"
}
localname_plural (mandatory)

Localnames in plural. Each line in this node represent a language. Valid languages are all languages Lime CRM supports. Example:

"localname_plural": {
"sv": "MÃ¥ltabeller",
"en_us": "Goal tables"
}
attributes

Sets attributes for the table. Each line in this node represent an attribute. Example:

"attributes": {
                    "tableorder": "3",
                    "invisible": "2",
                    "descriptive": "[test].[title]",
                    "syscomment": "My comment",
                    "label": "15",
                    "log": "1",
                    "actionpad": "lbs.html"
                }

Valid attributes:

Attribute Mandatory Possible values Value if not provided
tableorder No Integer Placed last
descriptive No text Record ID
invisible No 1/2 ("Yes"/"Yes, for everyone but administrators") "No"
syscomment ("Comment") No text
label No Integer No label
log ("Log all changes") No 0/1 (No/Yes) Default
actionpad No text
fields
name (mandatory)

The database name of the field. Example:

"name": "customernbr"
localname (mandatory)

Localnames for the field. Each line in this node represent a language. Valid languages are all languages Lime CRM supports. Example:

"localname": {
    "sv": "Kundnummer",
    "en_us": "Customer number"
}
separator

Adds a separator to the field. The separator is placed BEFORE the field. Specify the localnames for the separator inside this node. Example:

"separator": {
    "sv": "Administrativ information",
    "en_us": "Administrative information"
}
limevalidationtext

Adds validation text to the field. Specify the localnames for the validation text inside this node. Example:

"limevalidationtext": {
    "sv": "Min valideringstext",
    "en_us": "My validation text"
}
comment

Adds a comment to the field. Specify the localnames for the comment inside this node. Example:

"comment": {
    "sv": "Min kommentar",
    "en_us": "My comment"
}
description

Adds tooltip to the field. Specify the localnames for the tooltip inside this node. Example:

"description": {
    "sv": "Min beskrivning",
    "en_us": "My tooltip"
}
options

Adds options to an option field, set field or textfield. Every option must be specified as an own node and localnames and other attributes are placed inside this node.

Important! Localize rows must be placed first in the node. If you place the color or default attribute first, these attributes will not be set. The integer representing the color in Lime CRM is derived by taking the RGB hex code for the desired color, reordering it as BGR, and then transform from hexadecimal to decimal.

Some color-examples:

Color Integer
red 255
yellow 65535
blue 16711680
green 32768

Example:

"options": [
    {
        "sv": "Alt 1",
        "en_us": "Alt 1",
        "key": "alt1",
        "color": "65535",
        "default": "true"
    },
    {
        "sv": "Alt 2",
        "en_us": "Alt 2",
        "key": "alt2",
        "color": "255"
    }
]
attributes

Sets attributes for the field. Each line in this node represent an attribute.

"attributes": {
    "fieldtype": "text",
    "limereadonly": "1",
    "invisible": "0",
    "required": "1",
    "width": "3",
    "height": "1",
    "length": "256",
    "defaultvalue": "Lund",
    "limedefaultvalue": "Application.ActiveUser.Record.Id",
    "limerequiredforedit": "0",
    "newline": "2",
    "fieldorder": "4",
    "isnullable": "0",
    "type": "1",
    "relationtab": "1",
    "syscomment": "My private comment",
    "formatsql": "0",
    "limevalidationrule": "My validation rule",
    "label": "18",
    "adlabel": "31"
}

Valid attributes:

Attribute Mandatory Possible values Value if not provided
fieldtype Yes string/integer/decimal/time/html xml/link/yesno/file/relation/geography set/option/formatedstring/color/sql -
invisible No 0/1/2/65535 (No/On forms/In lists/Everywhere) Default
length No integer (can only be set for textfields) nvarchar(max)
required No 0/1 0
fieldorder No Integer Put last
height No Integer Default
width No Integer Default
newline (width properties) No 0/1/2/3 ("Variable width"/ "Variable width on New line"/ "Fixed width"/ "Fixed width on new line") 2 (Fixed Width)
defaultvalue No text Default
limedefaultvalue No text Default
isnullable No 0/1 0
limereadonly No 0/1 Default
limerequiredforedit No 0/1 Default
type No Timefields: 0/1/2/3/4/5/6/7/8/9 ("Date" / "Date and Time" / "Time" / "Year" / "Half a Year" / "Four Months" / "Quarter" / "Month" / "Week" / "Date and Time (with Seconds)" Optionlists: 0/1 ("Color and Text"/"Only Color") 0
relationtab No 0/1 (actually corresponds to relationmaxcount, the name is misleading. Only valid when creating a relation) 0
syscomment (private comment) No text
formatsql No 0/1 (False/True) Default
limevalidationrule No text
label No Integer No label
adlabel No Integer No AD-label

relations

Here you specify which relations to create. This section only contains information about which fields/tabs to create a relation between, the rest of the information about each field you specify in the field-section. There you also specify whether the field should be an actual field or a tab (attribute relationtab, which actually corresponds to attribute relationmaxcount). Example:

"relations": [
    {
        "table1": "company",
        "field1": "person",
        "table2": "person",
        "field2": "company"
    },
    {
        "table1": "business",
        "field1": "responsible",
        "table2": "coworker",
        "field2": "business"
    }
]