Microsoft Lystavlen - the Online display board

Lystavlen is the danish word for 'the display board'. This blog is all about sharing the beauty of Microsoft Online Services

November, 2014

  • Calculated Fields - New in CRM 2015

    In previous versions of Dynamics CRM, calculations required developer support.  It required additional code to be written and deployed through plug-ins, javascript, etc. 

    This additional code required developers to maintain and update them which causes additional costs. As more records are is created in Dynamics CRM and as the business logic in these calculations evolves, there is a higher risk for performance degradation.

    With the release of Microsoft Dynamics CRM 2015, two new fields are being introduced to help some of the more common calculations done in CRM now; Calculated fields and Rollup Fields. Rollup fields and calculated fields can be used independently or complementary to each other.

    In this blog post I'll talk about Calculated fields.

    Calculated fields lets you, as a System Customizer, define the value of that field by using calculation operators or functions.  A developer no longer needs to write code to accomplish such a task. The calculated fields comprise of calculations that use fields from the current entity or related entities.

    For example, you might want to know the weighted revenue for an opportunity which is based on the estimated revenue from an opportunity multiplied by the probability.

    Or, you might want to automatically apply a discount, if an order is greater than $500.

    Calculated Fields are not limited to numeric fields.  For instance, a calculated field can set a Phone Number for an opportunity based on the Account or Contact information.

    They can also work with date fields as well.

    A calculated field can contain values resulting from a various amount of operators.  Let’s take a look at what consists of a calculated field.

    Calculated Fields are very flexible in the terms of what Data Types are supported. We support the following data types:

    • Single Line of Text
    • Option Set
    • Two Options
    • Whole Number
    • Decimal Number
    • Currency
    • Date and Time

    To make a field Calculated you:

    1. Pick a Data Type, eg. "Date and Time" or "Currency"
    2. Set the Field Type to "Calculated",
    3. Click the Edit button next to the Field Type drop down to create the field and open the Editor

    Creating a calculated field uses the same editor as Business Rules or Business Process Flows. 

    The editor has been enhanced in CRM 2015, specifically for Calculated Fields we've added intellisense. This allows you to type in the logical or display name of a field or function and get suggestions of the available fields or function similar to what has been typed.

    When setting the value of a calculated field, you have the ability to choose different functions or operators that allow the data to be modified in certain ways.  We’ll quickly cover the different functions and operators available based on Data Types.

    The Math Operators are the typical math operators so we won’t really go into them here.

    • = (Equal)
    • + (Plus)
    • - (Minus)
    • / (Divide)
    • * (Multiply)

    The String Functions are

    • CONCAT(single line, single line, single line…)
    • TRIMLEFT(single line, whole number)
    • TRIMRIGHT(single line, whole number)

    CONCAT add single lines of text together. These can be fields or can be actual lines of text. If using lines of text, the text will need to be encased with double quotes.  For instance, we want to concatenate the Contact’s First name with the Account Name. 

    If we simply Concatenate those two fields, it would have show SidneyBlue Yonder Airlines (sample) without a space between Sidney and Blue.  You can see below, a space was added in between the two fields.

    TRIMLEFT takes a single line of text and trims that number of characters starting from the left and working it’s way to the right.

    TRIMRIGHT takes a single line of text and trims that number of characters starting on the right and working it’s way to the left. 

    Finally, we have Date Time functions which is going to take a date time and either add or subtract the specified numbers of Hours, Days, Weeks, Months, or Years.

    • ADDHOURS(Whole Number, Date and Time)
    • ADDDAYS(Whole Number, Date and Time)
    • ADDWEEKS(Whole Number, Date and Time)
    • ADDMONTHS(Whole Number, Date and Time)
    • ADDYEARS(Whole Number, Date and Time)
    • SUBTRACTHOURS(Whole Number, Date and Time)
    • SUBTRACTDAYS(Whole Number, Date and Time)
    • SUBTRACTWEEKS(Whole Number, Date and Time)
    • SUBTRACTMONTHS(Whole Number, Date and Time)
    • SUBTRACTYEARS(Whole Number, Date and Time)

    Example

    In this example I've created a custom entity with two custom (Date and Time) fields; AnyDate and OneWeekLater (calculated)

    When I created the OneWeekLater field I picked the Data Type (Date and Time), then I chose Calculated for the Field Type, and finally clicked the Edit button to create the field and enter the Editor

    In the Editor the Date functions available to me allowed me to calculate the date one week after the date picked in the AnyDate field (using AddDays(7, new_anydate)) and stick that date into the OneWeekLater field

    Testing the calculated field


    Picking "Dec 25 2014" for AnyDate

    Calculated field displays "Jan 1, 2015"

    I hope you'll enjoy Calculated Fields in CRM 2015 once its there

  • What Dynamics Partners need to know to access the Dynamics Learning Portal

    Since the official launch of the Dynamics Learning Portal (DLP) on Sept 09th this year, the DLP support team keeps helping the Microsoft Dynamics partners get access to the portal.

    The three main issues that prevent partners access on their first visit to the portal are:

    1. Valid service plan to access e-Learning i.e., they don’t have a training pack
    2. MS account authentication needs attention
    3. Employee is not included in PartnerSource Business Center (PSBC) database

    In an attempt to reduce the amount of support escalations on both DLP support and MBS IT support teams, we've created a short video (11 minutes) with the steps that partners can follow themselves to resolve their DLP access issues.

    Access the video here

    After clicking on this link, you will be see the DLP Help area that includes FAQ, Videos and System Requirements. The video is called “Resolutions to common issues when accessing DLP for the first time”.

  • Enhanced offline support in CRM for Tablets

    With the CRM for Tablets application - released in CRM 2013 - we gave sales people compelling and powerful mobility scenarios. Sales people can get their work done from the device and location of their choice.

    Data is cached in an Offline Cache (HTML 5 local storage) allowing salespeople to access (read only) previously viewed information in the application when offline. See this blog post "Understanding CRM for tablets offline scenario" for more.

    For CRM 2015 we plan to enhance the offline support to enable the following key scenarions in offline mode

    1. Add notes to existing records (records already on the server)
    2. Add opportunities to existing records using associated grid/lists
    3. Add new records for entities (without lookup field support)

    When you go offline, you'll see a 'create new' button in the all entities list respectively for which you has create permission.

    The Dashboard command bar will have the "+" for global entity create similar to online mode

    All records which are created in offline (and not yet saved to server)  will be present in the Drafts Records view.

    When clicked a record is opened in the quick create form with the Close and Save draft option. Fields are editable and you can make changes to this draft.

    Lookups will not be user editable in offline create/update scenarios. This includes partylist, owner and customer lookups. When you open the offline drafts in online mode, the look-up fields and attachments are enabled again.

    The “Add new opportunity" button when clicked from the associated grid for the account and contact will autopopulate the customer lookup (Account or Contact). You cannot edit this lookup field in offline mode and hence the opportunity specific to the context of the customer would be locked.

    When you go offline, you can add notes to the existing records which are available offline. Notes can be correctly created and associated to corresponding parent records when the Tablet client goes online again.

    Save records to CRM when back online

    Once you are back online you can tap the reconnect button on the Tablet app and connect to CRM in the same manner as for CRM 2013.  Using the sitemap you can navigate to the Drafts view where you can see all offline created notes and records in the drafts view and take appropriate action (eg make minor changes and then save to server)

    Draft records are removed during Sign Out. The Tablet app will warn you if you try to sign out and still have unsaved drafts

    Important Considerations

    Creating Drafts

    • Only new Draft records can be created (you cannot modify existing records offline)
    • New Draft records cannot be added to other Draft records
    • Quick create forms are used for Draft create/update experience
    • New Draft records cannot be created from a full grid

    Lookups

    • No lookup/partylist editing support while offline
    • Creating record from a parent record can auto populate a lookup field

    Save Drafts to Server

    • Drafts do not automatically sync once reconnected
    • Drafts must be manually saved to the server individually (no Save All option)
    • Draft records are removed during Sign Out
    • Drafts will block metadata sync

    Dynamics CRM 2015 has not been released yet. The above described product capabilities and themes are subject to change.