saleslogix [q&i]
[Solutions] [Features] [Free Software] [Free Support] [E-Demo] [How To Buy] [services] [Funny Stuff] [Contact Us]

We also offer Support and Training for new or existing Information Automation Systems.


 

SalesLogix Technical Support Knowledge Base


Customization

Properties of Tables 

It is important to understand some basic properties of a relational database when attempting to customize SalesLogix. There are multiple tables in a relational database and its structure is defined by how these tables relate to each other. The information that can be acquired from a database is dependent on how these tables are connected to each other. Therefore, understanding table relationships and table joins is vital when customizing SalesLogix. 

Table Relationships

Overview 

The relationship between two tables is based upon both tables containing at least one field with a value that is identical. In most cases the name of the field is identical as well, but this is not always the case. For example, the ACCOUNT and CONTACT tables are related because they each contain an "AccountID" field that has the same value. However, the ACCOUNT table is related to the USERINFO table through the "AccountManagerID" field in the ACCOUNT table and the "UserID" field in the USERINFO table. The value in the "AccountManagerID" field is the same as the value in the "UserID" field. Therefore, the tables are related even though the names of the fields are different. 

There are several different types of relationships that are possible. These relationship types include One to One, Zero to One, One to Many, Zero to Many and Many to Many. However, SalesLogix handles the Zero to One case within the One to One relationship and also handles the Zero to Many case within the One to Many relationship. 

One to One Relationship 

If this is the relationship between two tables, it indicates that for a single record in one table there is none or one related record in another table. For example, after doing an ACT! import, the ACT! User defined fields could be populated with Contact information. Since each field can only contain one piece of information pertaining to each Contact, the relationship between the ACTUSERDEFS table and the CONTACT table is One to One.

One to Many Relationship 

If this is the relationship between two tables, it indicates that for a single record in one table there is none, one, or many related records in another table. For example, more than one activity can be associated with a contact and at least one contact is always associated with an activity. Therefore, the relationship between the ACTIVITY table and the CONTACT table is One to Many. 

Many to Many Relationship 

If this is the relationship between two tables, it indicates that there are many records in one table that relate to many records in another table. For example, a user can have many activities and an activity can have many users. Therefore the relationship between the USERINFO and ACTIVITY tables is Many to Many. In SalesLogix, Many to Many relationships are handled via an Associative table. This Associative table has a One to Many relationship with two tables and thereby resolves the ultimate Many to Many relationship. Continuing the example above, the USER_ACTIVITY table is an Associative table. It has a One to Many relationship with the USERINFO table and also a One to Many relationship with the ACTIVITY table, thereby resolving the Many to Many relationship between the USERINFO table and the ACTIVITY table. 

Ensuring uniqueness 

Every table has at least one field that is used to ensure that each record in the table is unique. This field is called the primary key. For example, the primary key of the ACCOUNT table is AccountID. When a record is added to the ACCOUNT table, a value is automatically entered in the AccountID field. This value is generated by the corresponding key in the SalesLogix.key file on the machine being used by the user who added the new record. 

Tables and Joins

The connection between two tables is called a join and is established using a field that exists in both tables. This field may have a different name in each table but contains the same information. For example, the ACCOUNT table is joined to the USERINFO table through the "AccountManagerID" field in the ACCOUNT table and the "UserID" field in the USERINFO table. The value in the "AccountManagerID" field is the same as the value in the "UserID" field. Therefore, the tables are joined even though the names of the fields are different.

Joins are primarily used to build queries that are run against the database to bring back information. When a join is created, a source table and a selected table must be identified. After the two tables have been joined, any field in either table may be used in a query. These queries are built using the SalesLogix Query Builder and can be used in customizing views, reports, and when performing a lookup. The type of join can determine what information is returned from this query.

Types of Joins

There are three types of joins. These include Inner, Left and Right joins.

• Inner Joins: If an inner join is used in a query, a record must exist in both the source and selected tables after the selection conditions have been met, in order for the record to be included in the results of the query. For example, the database is queried for Contacts using a selection condition of LASTNAME starting with "A". If an Inner Join is being used between the CONTACT table and the ACTIVITY table, each Contact with a last name starting with "A" would have to have an activity in order to be returned as part of the results of the query.

• Left Joins: If a left join is used in a query, a record must exist in the source table after the selection conditions have been met, in order for the record to be included in the results of the query. Continuing the example from above, the database is queried for Contacts using a selection condition of LASTNAME starting with "A". If a Left Join is being used between the CONTACT table and the ACTIVITY table, each Contact with a last name starting with "A" would be returned as part of the results of the query, regardless of having any activities.

• Right Joins: If a right join is used in a query, a record must exist in the selected table after the selection conditions have been met, in order for the record to be included in the results of the query. There will rarely be the need for a Right Join when working in SalesLogix. In fact, using a Right Join can in some cases result in slower performance or an incorrect set of results. Continuing the example from above, the database is queried for Contacts using a selection condition of LASTNAME starting with "A". If a Right Join is being used between the CONTACT table and the ACTIVITY table, Contacts would need to have activities AND a last name starting with "A" in order to be returned as part of the query. This would produce the same result set as an Inner Join in this particular example. However, the Right Join case would perform MUCH slower. This is due to the fact that the right join forces the selection of the entire set of activities first, then applies the Contact last name condition. This is a much larger data set that must be manipulated compared to the case of the Inner Join where the data set only contains Contacts having Activities.

Local vs. Global Joins

It is possible to create a join Locally and/or Globally. Both these ways share a similar concept but serve different purposes.

• Local Joins: A local join is temporary and only exists in the SalesLogix Query Builder data tree structure for one session. The object utilizing the resulting query will hold the properties of this local join while it is in use. To open the Local Join dialog box, select a field in the SalesLogix Query Builder, click the right mouse button and select Create or Edit Local Join from the shortcut menu.

• Global Joins: A global join is permanent and exists from session to session in the SalesLogix Query Builder data tree structure. SalesLogix contains a series of predefined global joins (system joins), which cannot be deleted. Anyone may utilize these predefined global joins by selecting a filed in the SalesLogix Query Builder and clicking the right mouse button. If a predefined global join exists for this field, the option to view it will display in the shortcut menu as "Global join to..." with a table specified. The SalesLogix Administrator may also create other global joins via the Global Join Manager. However, extreme care must be exercised when doing this as it is possible to inadvertly create a global join which causes performance problems. To open the Global Join Manager dialog box, click the Joins button in the SalesLogix Query Builder while logged in as the Administrator.

The SalesLogix Database Manager

The SalesLogix Database Manager is part of the SalesLogix Administrator and is used to add tables and fields to the database that may be required for the various customizations. Newly created tables and fields change the database schema and are automatically integrated into security, synchronization, and the necessary SalesLogix dialog boxes. In addition, any future changes made to the database schema are synchronized to remote users as outlined by the users' access rights.

Once tables or fields are created and applied to the database, their properties can not be changed. The exception to this rule is the adding or removing of indexes. If a table or field's properties need to be changed, it must be deleted and then re-added. When adding a table or a field, the change is not actually made to the database until this change is applied. To apply a change, click the Apply button in the Database Manager dialog.

General Rules for Tables

• A table that is included with SalesLogix can not be deleted.

• A created table can have a One to One or One to Many relationship with the CONTACT, ACCOUNT, or OPPORTUNITY table.

• A created table can have no relationship to any other table within the database. However, VBA scripting will be required in order to display a view that references this unassociated table.

• A created table can not have a relationship with a SalesLogix table that falls within the OTHER category, such as the PRODUCT table.

• A created table can not have a relationship with another custom added table.

• When a table is created, the following fields are automatically added.
CREATEUSER, CREATEDATE
MODIFYUSER, MODIFYDATE
Primary key field of the associated table (if any)
Primary key field of the created table (if it has a One to Many relationship)

General Rules for Fields

• A field that is included with SalesLogix can not be deleted.

• Fields can be added to any table that was custom created.

• Fields CAN NOT be added to core SalesLogix tables.

• If MS SQL Server is the database platform, fields can not be deleted. This is due to the fact that MS SQL Server does not offer syntax for dropping a field. The only option for removing a field once it is applied to the database is to delete the entire table.

Working with the Database Manager

The SalesLogix Database Manager lists the tables in the database on the left and the fields in the selected table on the right. The plus signs can be clicked to expand the table tree structure. Clicking the minus signs collapses this tree structure. The field names for a table appear on the right when a table is selected.

The icons listed below perform most necessary functions when working in the SalesLogix Database Manager.

Click this icon to Add a New Table.
Click this icon to Delete a Table.
Click this icon to View the Properties of a Table.

Click this icon to Add a New Field.
Click this icon to Delete a Field (remember, this is not possible if using MS SQL Server).
Click this icon to View the Properties of a Field.

Adding a Table

To add a new table, click the Add New Table icon to open the Table Properties dialog.

Enter the name of the table in the Table Name field. Decide if the table will be associated with the CONTACT, ACCOUNT, or OPPORTUNITY table using the Association drop-down list. Then select One-To-One or One-To-Many as the Type of association. If the table being added will have no relationship to any of the three main tables, select the Other/None option from the Association drop-down list. This selection will automatically grey-out the Type drop-down list.
The Secured option: This field denotes if the table being added will appear in the table list of the User Security Profile dialog. Access to fields in the added table can be restricted to users but only if this Secured option is selected. One thing to keep in mind is that SalesLogix only allows 750 total secured fields (Version 2.1x). This includes the approximately 120 secured system fields that can not be deleted or modified. Therefore, if a large number of tables and fields will be added to the database, the secured option should not be enabled for all the added tables.

Click Okay once all the fields in the Table Properties dialog have been completed. The automatically added fields and the table itself will then appear in the Database Manager. However, the table must be applied to the database before proceeding any further if it is to be successfully created. To apply the table to the database, click the Apply button.

Adding a Field

To add a new field, select the table that will contain the field. Then click the Add New Field icon to open the Field Properties dialog.

Make sure the correct table is listed in the Table Name field. Then enter the name of the field being added.

Field Type: Select the type of the field from the Field Type drop-down list.

  • String: used for any field that will contain letters or a combination of letters and numbers up to a maximum of 255 characters.
  • Memo: used for any field that will contain letters or a combination of letters and numbers that may be longer than 255 characters. This field type is stored in the database as a BLOB and can therefore support characters such as quotes, commas, asterisks and hard returns in the middle of text.
  • Long Integer: used for any field that will contain whole numbers up to approximately two million (2,147,483,647 exactly).
  • Short Integer: used for any field that will contain whole numbers up to 32,767. One item to note is that a field of type Short Integer may not be queried upon using the SalesLogix Query Builder.
  • Float: used for any field that will contain numbers with decimal values or numbers that may be greater than approximately two million (2,147,483,647 exactly).
  • Date: used for any field that will contain a date and/or time.
  • Boolean: used for any field that will contain a True/False value. This field type would be used if the field in question will eventually be linked with an object such as a Check box or Radio button. 

  • Field Length: This parameter only applies if the Field Type selected is of type String. If String was selected as the Field Type, the maximum length of the field must be entered as the Field Length. Remember that the type String has an ultimate maximum of 255 characters.

    Indexed: Check this option if the field being added will eventually contain information that will be searched (queried) on a regular basis.

    Click Okay once all the fields in the Field Properties dialog have been completed. The field will then appear in the Database Manager. However, it must be applied to the database before proceeding any further if it is to be successfully created. To apply the field to the database, click the Apply button.

    Views

    The Pick-List Object

    Overview

    A Pick-List may be used to allow a user to select an item from a pre-defined list of options rather than having to enter the information in its entirity. This list can allow multiple selections if required as well. Some examples of pick lists that exist within SalesLogix by default are the Cities list, the Contact Title list and the Account Type list.

    A complete Pick-List is comprised of three components: a field in the database that stores the selected value, a Picklist that contains the values to be selected from, and a Pick List object on a view that allows the actual selection of the value. The actual Picklist is linked to its corresponding Pick List Object via a unique Picklist name. This Pick List Object is in turn linked to the field in the database via the properties of the object.

    The procedure for completely configuring a functional Pick List is outlined below.

  • Create the required field (and table) for the Pick-List
  • Create the Picklist that will used with the Pick List Object
  • Create and Configure the Pick List Object

  • Before beginning however, decide if the Pick List Object will be associated with an Account, Contact or Opportunity view.

    Creating the required field for the Pick-List

    Create the required field for the new Pick-List using DB Manager in the SalesLogix Workgroup Administrator. If no tables have been added to the database as of yet, a custom table must first be created since fields may not be added to any core SalesLogix tables. This table must have at least a One to One relationship with one of the three main tables - Account, Contact or Opportunity - depending on which view you decided the Pick List Object will be associated with. Make sure that all these changes are applied to the database and exit both DB Manager and the SalesLogix Workgroup Administrator.

    Creating the Picklist

    To create the Picklist use the Saleslogix Client or the Saleslogix Architect to open the Picklist Manager. Using the SalesLogix Client, select Manage from the Tools menu and then select the Picklists option. Using the Saleslogix Architect, select Picklists from the View menu. Once the Pick List Manager opens, click the Add button to enter a Pick List Name. Click Okay when finished to create the Picklist.

    The Picklist must now be populated with items. Click Add in the Edit List Dialog to enter items for the Picklist. Items may be added, deleted or modified at a later time as well. In addition to the Picklist item entered, an associated code may be added. This field is not required.

    Picklist Attributes: there are several Picklist attributes that determine the behavior of a Picklist when set. Use the Test List field and button to determine if the selected attributes perform as desired.

  • Required entry: forces users to enter a value in the field.
  • Allow multiple selections: allows users to select more than one item from a Picklist.
  • Text must match a list item: ensures that the value entered in the field matches an item in the Picklist.
  • Sorted alphabetically: displays the Picklist items alphabetically.
  • Users cannot edit items: prevents users from adding, editing or deleting Picklist items. 

  • The Import & Export Features: these features may be used to copy Picklists between databases.

    Close the Picklist Manager once the Picklist has been created, had items added and been correctly configured.

    Creating and Configuring the Pick List Object

    Open the SalesLogix Architect and decide if the Pick-List will be located on:
    • A new form or tab
    • An existing view
    If it will be on a new form or tab, select New>View from the File menu or click the new plugin icon on the toolbar. Then select Account View, Contact View, or Opportunity View based on which view the Picklist will be associated with.
    If the Pick-List will be on an existing view (ex: the Account Detail view), select Open from the File menu or click the folder icon on the toolbar. Once the Open Plugin dialog comes up, select View from the drop-down list and then select the desired view to be modified.

    Once the new or existing view that will contain the Pick-List is open, also open the Palette and Properties boxes by clicking the icons on the toolbar. Select the Objects Tab of the Palette, and drag and drop the Pick List object onto the view. Select this Pick List Object and then select the Properties box. Scroll through the list of Properties until you see the ListName property. Click on this field and ellipsis will appear. Click on the ellipsis to open the menu of existing Picklists. Select the Picklist name that you previously created for this Pick List object from the list and click Okay. Scroll through the list of properties again until you see the Text property. Then select the Data Tab of the Palette and find the table and field which were previously created for the Pick-List. It may be necessary to create a Local Join using the ACCOUNTID, CONTACTID, or OPPORTUNITYID field (depending on the type of view selected) in order to view your custom created table and fields. Once the field in question is found, select the field name and drag-and-drop this field into the Text property field of the Properties box for the Pick List object.

    Other Notable Properties: a few other properties that you may wish to set are ButtonOnFocus, ButtonType and ButtonVisible.
    • ButtonOnFocus is a property that toggles between True and False. Set to True, it denotes that the button for a Pick-List only appears when the cursor is placed within the Pick List Object. Set to False, it denotes that the button for the Pick-List will always be visible.
    • ButtonType allows you to select the type of Pick-List button. Ellipsis (DotDotDot) and the Down Arrow are some common choices.
    • ButtonVisible is also a property that toggles between True and False. This property must be set to True if the button for the Pick-List is to ever appear.

    Once the Pick List Object has been completely configured, close both the Palette and Properties boxes and select Save from the File menu. Name the Pick-List view if it is a new form or tab, otherwise save the changes to the existing view. Once the view is saved, select Plugin Properties from the File menu. Select the Security Tab and release the view to the user or group of users who need access to the Pick-List.

    Lookups

    Lookups may be used to allow a user to quickly locate an item contained within the database. Some examples of lookups that exist within SalesLogix by default are the Contact and Account name lookups that are associated with the label of the field in the corresponding Detail View.

    A complete Lookup is comprised of three components: a field in the database that is being searched upon, a Lookup Argument, and an Object such as a Button, Label or LabelButton that launches the Lookup window.

    The procedure for completely configuring a functional Lookup is outlined below.
    • Decide on the field (and table) being searched on (this may be created if necessary)
    • Create the Lookup argument that will be used with the Object (ex: LabelButton)
    • Create and Configure the Object for the Lookup Argument
    Before beginning however, decide if the Lookup will be associated with an Account, Contact or Opportunity view.

    Selecting the Lookup field

    It is possible to create a Lookup that searches an existing system field or a field that has been custom added to the database. The table containing this selected field does need to be joined to one of the main tables (Account, Contact or Opportunity) in order to correctly configure the Lookup Argument. Therefore, if you would like to create a lookup for a field that has been added, you may need to create a Local Join to the Account, Contact or Opportunity tables. The main table that you join to needs to correspond to the main view that the Lookup will eventually be launched from. For example, you would like to have a button on the Contact view that allows you to lookup a contact based on the person's hobbies. Therefore, you would create a table that has at least a One to One relationship with the CONTACT table (ex: PERSONAL) using the SalesLogix Database Manager and add a HOBBIES field to this table (PERSONAL.HOBBIES). 

    Creating the Lookup Argument 

    The Lookup argument is created from within the SalesLogix Client. Select the Manage option from the Tools menu and then select the Lookups from the resulting list of items to open the Lookup Manager dialog. 

    The Lookup Manager: select the Main Table that you would like to work from. Although all the tables within SalesLogix are listed in this Main Table drop-down list, you must select either the Contact, Account or Opportunity table if the Lookup Argument is to be correctly configured. Once the Main Table is selected, click the Add button to open the Add Lookup dialog.

    The Add Lookup dialog: this dialog is similar to the SalesLogix Query Builder and will display a list of tables. Create a Join if necessary using the Primary ID (key) field if the Lookup field is not part of the selected Main Table and does not appear in the list. Select this Lookup field and then click the Select button located to the right of the Search Field box to denote this field as the Lookup Search field. This Search Field will also be the name of the Lookup. Continuing the example from above, you created a PERSONAL table that had a One to One relationship with CONTACT and contained a Lookup field of HOBBIES. The Search Field would be populated with Contact.Personal.Hobbies and the name of the Lookup would be Personal.Hobbies.

    Other Fields in the Add Lookup dialog:
    The ID Field should be automatically populated with the Primary key of the Main Table (ex: CONTACTID).
    • The Name Field should also be automatically populated. This field usually contains the logical default value for the Main Table that was selected and is automatically inserted into the Layout of the resulting Lookup Window. Continuing the example from above, the CONTACT table is the selected Main Table. Therefore, the Name Field is automatically populated with the calculated field of Contact Name and this field is added to the Layout of the Lookup.
    • It is possible to associate a Picklist with a Lookup. This allows the user to select an item from a Picklist as the search criteria when performing the Lookup. To associate a Picklist with the Lookup, select the name of a Picklist from the drop-down list available in the Pick List field of the Lookup Manager.
    • The Field Type of the Lookup must match the field type of the Search field (ex: String).

    Selecting the Lookup Layout: the columns that appear in the resulting Lookup Window may be customized. To change the default layout, click the Layout button. This will open the SalesLogix Query Builder and display the Layout tab. The field which appeared in the Name Field of the Add Lookup dialog will be one of the default columns. You should probably add the Search Field of the Lookup to this layout as well by dragging the field name down to the layout. Once the layout of the Lookup window has been customized, click Okay to close the SalesLogix Query Builder.

    Once the Lookup Argument has been completely configured, click Okay to close the Add Lookup dialog and then click Close to close the Lookup Manager.

    Creating and Configuring the Lookup Object

    The Lookup Object should be created and configured within the SalesLogix Architect. Open the SalesLogix Architect and decide if the Lookup Object will be located on:
    • A new form or tab
    • An existing view
    If it will be on a new form or tab, select New>View from the File menu or click the new plugin icon on the toolbar. Then select Account View, Contact View, or Opportunity View based on which view the Lookup will be associated with.
    If the Lookup will be on an existing view (ex: the Contact Detail view), select Open from the File menu or click the folder icon on the toolbar. Once the Open Plugin dialog comes up, select View from the drop-down list and then select the desired view to be modified.

    Once the new or existing view that will contain the Lookup is open, also open the Palette and Properties boxes by clicking the icons on the toolbar. In general, any object that contains a WhenClick property may be configured to perform a Lookup when that object is clicked. Some of the common objects used for this purpose are Button, Label, LabelButton and EditBox (WhenLabelClick). Select the Objects Tab of the Palette and drag and drop the desired object onto the view. Then select the Properties box to configure the Lookup. Scroll through the list of Properties until you see the WhenClick or WhenLabelClick or WhenDoubleClick property. Click on this field and ellipsis will appear. Click on the ellipsis to open the When Property Editor.

    When Property Editor: select Lookup from the Action drop-down list to enable the Argument field. Click the ellipsis in the Argument field to open a list of the main tables and all the Lookup Arguments that are associated with them. Select the previously created Lookup Argument from this list (ex: Personal.Hobbies) and click Okay when finished.

    This configures the Lookup Object therefore, close both the Palette and Properties boxes and select Save from the File menu. Name the Lookup view if it is a new form or tab, otherwise save the changes to the existing view. Once the view is saved, select Plugin Properties from the File menu. Select the Security Tab and release the view to the user or group of users who need access to the Lookup.

    Datagrids (& Data Views)

    Overview

    A Datagrid is a useful way of viewing information in a table format. Data Views are used to populate the information visible in a Datagrid. Therefore, a Data View is required for every Datagrid. Some examples of Datagrids that exist within SalesLogix by default are the Notes/History and Activities tabs found in both the Account and Contact views. Note however that these are system level Datagrids and cannot be edited.

    A Datagrid may be set up to display information pertaining to the current Account, Contact or Opportunity. This way, the information in the Datagrid changes as you move from one Account, Contact or Opportunity to another. This is a Filtered Datagrid. If needed, a Datagrid may also be set up to display the same set of static information regardless of the current Account, Contact, or Opportunity. This is a Static Datagrid.

    The procedure for completely configuring a functional Datagrid is outlined below.
    • Create the required table and fields for the Datagrid
    • Create the Data View that will populate the Datagrid
    • Create and Configure the Datagrid
    Before beginning however, decide if the Datagrid will be associated with an Account, Contact or Opportunity view.

    Creating the required Table and Fields

    Create the required table (ex: YOUR_TABLE) and fields (ex: YOUR_FIELD) for the new datagrid using DB Manager in the SalesLogix Workgroup Administrator. This table must have a One to Many relationship with one of the three main SalesLogix tables - Account, Contact, or Opportunity - depending on which view you decided the Datagrid will be associated with. Make sure that all these changes are applied to the database and exit both DB Manager and the SalesLogix Workgroup Administrator.

    Creating the Data View

    Open the SalesLogix Architect and select New>View>Data View from the File menu or click the new plugin icon on the toolbar and select View>Data View. Select the main table that the DataView will be based on from the list of table names (ex: YOUR_TABLE, which was created in the previous step). Once a blank view appears, open the Palette and Properties boxes by clicking the icons on the toolbar. Select the Data tab of the Properties box and drag and drop the fields created for the Datagrid onto the Data View. This form may also be customized with any of the objects in the Palette. Once it is complete, close the Palette and Properties boxes.

    Select Save from the File menu and name the Data View. Set the Family to Account, Contact, or Opportunity. Once the view is saved, select Plugin Properties from the File menu. Select the Security Tab and release the view to the user or group of users who need access to the Datagrid.

    Creating and Configuring the Datagrid

    Open the SalesLogix Architect and decide if the Datagrid will be located on:
    • A new form or tab
    • An existing view
    If it will be on a new form or tab, select New>View from the File menu or click the new plugin icon on the toolbar. Then select Account View, Contact View, or Opportunity View based on which view the Datagrid will be associated with.
    If the Datagrid will be on an existing view (ex: the Account Detail view), select Open from the File menu or click the folder icon on the toolbar. Once the Open Plugin dialog comes up, select View from the drop-down list and then select the desired view to be modified.

    Once the new or existing view that will contain the Datagrid is open, also open the Palette and Properties boxes by clicking the icons on the toolbar. Select the Objects Tab of the Palette, and drag and drop the Datagrid object onto the view. Select this Datagrid, click the right mouse button (RMB) and select Edit Query from the short cut menu to open the Query Builder dialog.

    Setting up a Filtered Datagrid:
    Select the Grid Details tab of the Query Builder. Select the table you created for the Datagrid from the drop-down list of the Table Selector field. This will change the contents of the upper two windows. You must then set the unique identifying field in your table that relates it to the parent table. The parent table is the Account, Contact or Opportunity table depending on which view you choose to associate the Datagrid with. Therefore, the unique identifying field would be the ACCOUNTID, CONTACTID or OPPORTUNITYID from your table. Drag and drop this unique identifier into the box below your table name.
    Example: If the parent table is the Account table, the unique identifier in the box would be YOUR_TABLE.ACCOUNTID when completed. However, if the BindID property displays something similar to ACCOUNT.YOUR_TABLE.ACCOUNTID when completed, you have the property set incorrectly.
    Once this has been set, select the Layout Tab and drag the appropriate fields down to the grid area and place them in the order in which you would like them displayed. When finished, click Okay to close the Query Builder.

    Select the Datagrid and open the Palette and Properties boxes, if they are not already open. Scroll through the Properties until you see the BindID property. In the Palette, click on the Data Tab and expand the contents of your parent table (Account, Contact, or Opportunity) until you see the ID field (i.e. ACCOUNTID, CONTACTID, or OPPORTUNITYID). Select this field and drag and drop it into the BindID property. When completed it should appear as ACCOUNT.ACCOUNTID if the Account table was the table you had chosen to associate the Datagrid with. If the BindID property displays something similar to ACCOUNT.YOUR_TABLE.ACCOUNTID when completed, you have the property set incorrectly.

    Once this is set correctly, scroll through the list of properties until you see the EditKeyField property. Enter the unique field of the table you created in this field. For Example, if the name of your created table was DIVISION, your unique field would be DIVISIONID. This particular property must be typed in and can not be dragged and dropped. Then scroll through the list of properties again until you see the EditView property. Click on this field and ellipsis will appear. Click on the ellipsis to open the menu of existing Data Views. Select the Data View that you previously created for this Datagrid from the list and click Okay.

    Close both the Palette and Properties boxes and select Save from the File menu. Name the Datagrid view if it is a new form or tab, otherwise save the changes to the existing view. Once the view is saved, select Plugin Properties from the File menu. Select the Security Tab and release the view to the user or group of users who need access to the Datagrid.

    Setting up a Static Datagrid:
    Select the Grid Details tab of the Query Builder. Select the table created for the Datagrid from the drop-down list of the Table Selector field. This will change the contents of the upper two windows. For a Static Datagrid, it is not necessary to configure a unique identifier for the query therefore, this box should be left blank. Select the Layout Tab and drag the appropriate fields down to the grid area and place them in the order in which you would like them displayed. When finished, click Okay to close the Query Builder.

    Select the Datagrid and open the Palette and Properties boxes, if they are not already open. It is not necessary to set the BindID property for a Static Datagrid therefore, this property should be left blank. Instead, scroll through the list of properties until you see the EditView property. Click on this field and ellipsis will appear. Click on the ellipsis to open the menu of existing Data Views. Select the Data View that you previously created for this Datagrid from the list and click Okay.

    If you are using SalesLogix Version 2.11a or lower, you will also need to set the EditKeyField property (Version 2.12 and higher will automatically set this property). Therefore, scroll through the list of properties again until you see the EditKeyField property. Enter the unique field of the table you created in this field. For Example, if the name of your created table was DIVISION, your unique field would be DIVISIONID. This particular property must be typed in and can not be dragged and dropped.

    Close both the Palette and Properties boxes and select Save from the File menu. Name the Datagrid view if it is a new form or tab, otherwise save the changes to the existing view. Once the view is saved, select Plugin Properties from the File menu. Select the Security Tab and release the view to the user or group of users who need access to the Datagrid.

    Reports

    Master Detail Reports

    Master Detail reports are a useful way of creating a report which includes information from two tables that have some relationship. For example, the OPPORTUNITY table has a One to Many relationship with the OPPORTUNITY_PRODUCT associative table. A Master Detail Report is comprised of a General Report based on one of the main tables (Account, Contact or Opportunity) and a Master Detail band based on the second table.

    The procedure for completely configuring a functional Master Detail Report is outlined below.
    • Create the General Report that will contain the Master Detail band.
    • Create the Master Detail band of the report.
    • Configure the General Report with the Master Detail band.
    Before beginning however, decide if the General Report will be an Account, Contact or Opportunity Report.

    Creating the General Report

    Open the SalesLogix Architect and select New from the File menu. Then select Report from the New Plugin list and also select Account, Contact or Opportunity report from the Report list. For example if the Master Detail report being created was a Products by Opportunity report, you would select Opportunity Report from the New Report list. Once the new report opens, click the Palette and Properties icons on the toolbar to open these dialog boxes as well. Then drag and drop the necessary objects from the Object Tab of the Palette on to the report and configure it as a normal generic report would be configured using the Properties box. For help on creating a general report, please see the Architect Help files or refer to your training manual. The Master Detail band will be created later. Save this report by selecting Save from the File menu. Then ensure that the report is working as desired by selecting Preview from the Tools menu.

    Once the general report is completely configured, close ALL open windows within the SalesLogix Architect including the Palette and Properties boxes. It is extremely critical that all these windows be closed before proceeding. There is a great risk of setting incorrect Data Paths that could lead to possible data corruption if this is not done.

    Creating the Master Detail Band

    Make sure there are no windows open within the SalesLogix Architect. Select New from the File menu. Then select Report from the New Plugin list and also select the Other Report option from the report list. This will open the Select Main Table dialog which contains a list of every table within the database. Scroll through the list and find the second table from which you would like to bring information into the Master Detail Report. Continuing the example from above, if the Master Detail report being created was a Products by Opportunity report, you would select Opportunity Product from the table list.

    Once the new report is open, click the Palette icon on the Toolbar to open the Palette. Select the Objects tab and find the Master Detail object. Drag and drop this object onto the work area. This will produce a green band on the report titled SubDetail. Then drag and drop a normal Band object from the Object tab of the Palette onto the Master Detail band. It will then appear that the normal Band (white) is contained within the green Master Detail band. Once the two bands have been set up, select the Data tab of the Palette and browse for the fields that you would like to eventually display on the MasterDetail Report. Drag and drop these selected fields (one at a time) onto the white area of the normal band contained within the Master Detail band.

    Save this report once it has been configured with all the necessary data. Then click the SubDetail title so the entire MasterDetail object is selected. Copy this band to the clipboard by selecting Copy from the Edit menu. Close the report and Palette and Properties boxes once this band is copied. Then select Open from the File menu and open the General Report that was created in the first section. Once this report is open, click on any area of it and then paste the contents of the clipboard by selecting Paste from the Edit menu. This will paste the Master Detail band into the General Report so that you may begin configuring the General Report with the Master Detail band.

    Configuring the General Report with the Master Detail Band

    Once the Master Detail band has been pasted into the General Report, the binding for this band must be set. Select the Master Detail band and then open the Properties dialog. The first three properties are BindField, BindID and BindTable. These will complete the configuration of the Master Detail report. However, it is extremely important that these properties be set in the manner specified below. Deviating from these specifications can result in incorrect data paths and corruption of the entire report.

    BindField: this is the unique field for the Main Table. This value must be typed in uppercase characters. Do not drag and drop this value from anywhere. For example, if you chose to create an Opportunity report, type OPPORTUNITYID into this field. If you chose to create a Contact report, type CONTACTID into this field.
    BindID: this is essentially the same value as the BindField. However you must drag and drop this field from the Data tab of the Palette into the BindID property. Do not type this field value. For example, if you chose to create an Opportunity report, you would open the Properties box and click the Data tab. Then browse the list for the Opportunity table and select the OPPORTUNITYID field. Drag this field from the Data tab into the BindID field of the Properties for the Master Detail band.
    BindTable: this is the name of the second table upon which the Master Detail band is based. This value must be typed in uppercase characters. Continuing the example from above, you chose to create an Opportunity report where the Master Detail band was pulling in information from the OPPORTUNITY_PRODUCT table. Therefore, type OPPORTUNITY_PRODUCT into this field.

    Once these three properties have been configured, the essential components of creating a Master Detail Report are complete. Customize the report further if necessary and then save these changes. Once the report is saved, select Plugin Properties from the File menu. Select the Security Tab and release the report to the user or group of users who need access to it.

     
     
    Back to the SalesLogix Knowledge Index
     



    | Home |
     

    SalesLogix® is a registered trademark of SalesLogix Corporation.
    E-mail info@saleslogix-software-qi.com or Call 416-253-5555