EditAble CRM Grid For Microsoft Dynamics CRM “How To” Guide Trial Configuration: “Buildings” EditAble CRM Grid Scenario AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Version 1.0 Table of Contents Overview........................................................................................................................................................3 Account Building Units EditAble CRM Grid ...................................................................................................3 Step 1 – Creating the EditAble CRM Grid Configuration ...........................................................................4 Step 2 – Adding Columns the EditAble CRM Grid .....................................................................................9 Step 3 – Add Grouping Options ...............................................................................................................10 Step 4 – Add Miscellaneous Options .......................................................................................................11 Step 5 – Add JavaScript to Calculate Monthly Lease...............................................................................12 Step 6 – Add the EditAble CRM Grid to the Account Form .....................................................................13 2 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Overview This document details the steps used to create the sample EditAble CRM Grid scenario configurations found in the AbleBridge EditAble CRM Grid Trial. We will detail the configuration for the Buildings grid, which has been added to the Account form to show records associated to the Account. A custom entity called Buildings was created to house the property information. For additional details about installing and configuring the AbleBridge EditAble CRM Grid, see the AbleBridge EditAble CRM Grid – Configuration Reference Guide. Buildings EditAble CRM Grid Scenario In this example, we are working with Account records for property management companies. We want to have visibility into all the units the company manages, with the ability to group them by building. We need to be able to edit properties of each unit such as Price per Square Foot, Lease Expiration, and Tenant. 3 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Step 1 – Creating the EditAble CRM Grid Configuration To create an EditAble CRM Grid, go to SettingsAbleBridge EditAble CRM Grids in your CRM organization. To create a new EditAble CRM Grid Configuration, click the new button to launch the EditAble CRM Grid Configuration Wizard which will guide you through the basic setup of an EditAble CRM Grid. Specify a name for the EditAble CRM Grid configuration. This name will be used to tell EditAble CRM Grid which configuration to load when we add it to the form in CRM. For this example, we will call the configuration “Buildings” Select the entity you want the EditAble CRM Grid to represent. We are going to select “Building”. The grid can be either Read Only or Editable 4 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Select the Columns to add to the grid. o Building o Building Status o Lease Expiration o Price Per SqFt o SqFt o Tenant o Unit Monthly Lease & Yearly Lease are not fields in the Building Entity. They are custom fields that will be added later and are calculated based on Price Per SqFt and SqFt. 5 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Column Labels are defaulted based on the Display Name shown on the entity, but you can choose a different Column Label to show in the grid. In the example above, Building Status has been changed to Occupancy. Column Width is defaulted to 100. The widths have been changed to reflect the way they show in the example grid. 6 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review You can show records “Based on a specific filter” or “Related to a parent record” We want to show information from the Building entity on the Account form, so “Related to a parent record” should be selected Choose the Account for the “parent record entity” and key 7 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Click “Finish” to complete your initial grid setup. Other than the Entity that is being displayed and the related parent record, you can change all the options you just selected at any time. After you click Finish, you will be able to make addition customizations to your grid. The form will look like the image on the next page. 8 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review There will be an editable grid called Columns where you can see all the columns that were selected earlier. You can use the grid to edit, delete or add new columns. Click “Change Column Order” from the toolbar to drag columns into a different order Click the “Coulmn Name” hyperlink to open the column record to edit properties that are not show in the grid. 9 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Step 2 – Add Grouping Options We want to group the results by Building Name, but we also want the user to be able to group by Status if needed. To do this, we will specify Building Name as the default group but also turn on the “Allow Dynamic Grouping” option. This allows users to group by a different field as well. Go to the Grouping tab of the EditAble CRM Grid configuration form and turn on Grouping by clicking the “Enable Grouping” checkbox. Select the Group Behavior. For our grid, we are going to use “Collapsible, Expanded by Default” which allows users to collapse each section of grouped records. We want to show sub-totals for the Sq Ft and Monthly Lease columns. To do this, select “Enable Summary Rows” Select “Allow Dynamic Grouping” to allow users to change the field the records are grouped by. Under Group 1, Select the Column Building, chose the Sort Order & click Summary Row. 10 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Step 3 – Columns Grid You can use the editable Coulumns grid on the EditAble CRM Grid Configuration form to make quick edits to the columns your grid will display. From the Columns grid, you can choose which other columns can be used for grouping (ex: Occupancy) For the Default Grouping column, uncheck the Visable box, so that you don’t see the Building Name listed twice Step 4 – Add Miscellaneous Options We’re going to set a few more options to finish up our EditAble CRM Grid configuration: Because we have specified summary columns, we’ll want to also show totals of those values at the bottom of the EditAble CRM Grid. To do that, we’ll need to change Footer to Yes under Display Options. We’ll also change Row Checkboxes to Hidden. Next, we’re going to set the grid to sort by Unit in ascending order. 11 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Step 5 – Add JavaScript to Calculate Monthly Lease The last thing we need to do is add some JavaScript to calculate the value of the Monthly Lease column. The calculation will be (Price Per Sq Ft) * (Sq Ft). We will have this calculation trigger whenever either the Price Per Sq Ft or Sq Ft values change. EditAble CRM Grid uses JavaScript Web Resource files, just like CRM Forms, and has an event-driven API that allows users to extend the functionality of their EditAble CRM Grids. For more information, refer to the AbleBridge EditAble CRM Grid – Event Scripting and API Reference. Create a new JavaScript Web Resource in CRM. Add the following JavaScript. This will get the current Price Per Sq Ft and Sq Ft values, multiply them, and update the Monthly Lease value with the result. function calculateMonthlyLease(context) { var pricePerSqFt = AbleBridge.DataGrid.GetFieldValue('new_PricePerSqFt', context.RowIndex, true); var sqFt = AbleBridge.DataGrid.GetFieldValue('new_SquareFeet', context.RowIndex, true); var monthlyLease = parseFloat(pricePerSqFt) * parseFloat(sqFt); if (!isNaN(monthlyLease)) { AbleBridge.DataGrid.SetFieldValue('new_MonthlyLease', monthlyLease, context.RowIndex, false); } } Next, we need to add the JavaScript function to our EditAble CRM Grid configuration. Back on the EditAble CRM Grid Configuration form, select "New” from the “Custom Events” grid. We’ll be creating two events, one for the Price / Sq Ft column and one for the Sq Ft column. Give the Event a descriptive name. We’ll start with the “Price / Sq Ft” column, so we’ll name our Event “On Change of Price Per Sq Ft” Select “Column Event” as the Type. Select the “Price / Sq Ft” column. In the Web Resource picklist, select the Web Resource you created earlier that contains the new JavaScript function. Next, enter the name of the JavaScript function. Do not enter parenthesis or parameters – EditAble CRM Grid will fill those in automatically. For the example function above, you would simply enter “calculateMonthlyLease”. 12 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Save that Event and create a second one. All the details of the second Event will be the same as the first, except we’ll specify the “Sq Ft” column and change the Name accordingly. Once you’ve completed the configuration, Publish the EditAble CRM Grid. Step 6 – Add the EditAble CRM Grid to the Account Form Now that we’ve set up the EditAble CRM Grid configuration, we can add it to our Account form. 13 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review Go to Customizations under Settings, and select “Customize the System”. Expand “Entities”, then “Account” and select Forms. Open the Main form on which you want to add the EditAble CRM Grid. The form can also be edited from an Account record. Choose the spot on the form where you want the EditAble CRM Grid to be and either insert a new tab or insert a new section. In the new section, insert a Web Resource. In the Web Resource lookup, search for “AbleBridge” and select the result. The name of the Web Resource that returns should be “abdg_/html/datagrid.htm”. Enter a Name and Label. There are two important things in the Web Resource Properties section: 14 AbleBridge, Inc. EditAble CRM Grid for Microsoft Dynamics CRM Scenario Configuration Review o o The Custom Parameter(data) text box is where you specify which EditAble CRM Grid configuration to load by using the name you gave the EditAble CRM Grid back in Step 1 of the EditAble CRM Grid Configuration. Select “Pass record object-type code and unique identifier as parameters.” Under the Formatting tab, set the Scrolling to “Never” and uncheck “Display border” You can set the sizing of the EditAble CRM Grid to whatever is appropriate, including the column Layout, Number of Rows, and whether to automatically use the available space. Save and publish the form. 15
© Copyright 2024 ExpyDoc