Archive

Archive for November 5, 2016

Dynamics 365 New Feature – Editable Grid

November 5, 2016 Leave a comment
  • Editable grid is a new custom control in Dynamics 365 that provides inline editing capabilities on web and mobile clients
Editable-grid

Editable-grid

  • It can group, sort, and filter data
Editable-grid-grouping-and-filter

Editable-grid-grouping-and-filter

  • Editable grid is supported in below grids on the web client, and in dashboards and form grids on the mobile clients.
    • Homepage grid,
    • Form grids
    • Sub grids
  • It honors the read-only field metadata and field-level security settings.
  • Editable grids also support business rules and form scripting.
  • Editable grids do not support roll up associated views
  • Editable grid can be configured on the entity only if its Customizable

Configure Editable Grid on Account Entity:

  • Go to Customization -> Entities -> Account -> Controls -> Add Control
Add grid

Add grid

  • Adding Look up: We can configure look up field on Editable grid with Search option.
Configure-look-up

Configure-look-up

  • Similarly we can also add  ‘Nested Grid View’ (Only supported for Tablet and Phone clients).

Editable Grid Events:

Editable grid supports the following events

Editable-grid-events

Editable-grid-events

  • OnRecordSelect
    • Event occurs when a single row is selected in the editable grid.
    • This event won’t occur if a user selects different cells in the same row, or selects multiple rows.

// Register this event on ‘onRecordSelect’ event

function gridRowSelect() {

// Read selected rows from editable sub grid
var selectedRows = Xrm.Page.getControl(“subGridAccounts”).getGrid().getSelectedRows();
}

  • OnChange
    • Event occurs when a value is changed in a cell in the editable grid and the cell loses focus.
    • This event can also occur when an attribute value is updated using the setValue
  • OnSave
    • Event occurs, when,
      • There is a change in the record selection.
      • Explicitly triggering a save operation using the editable grid’s save button.
      • Upon sort, filter, group, pagination, or navigation operation from the editable grid while there are pending changes
    • Editable grid suppresses duplicate detection rules up on Save.
    • If a user edits multiple columns of the same record in sequence, the OnSave event will only be fired once
  • Editable grid control does not implement an auto-save timer

Configure Editable Sub Grid:

  • Sub grid on the form can be configured as Editable grid
  • I have a Custom entity ‘Company Accounts’ having 1:N relationship with ‘Accounts’
  • I added a Sub grid ‘subGridAccounts’ on the ‘Company Accounts’ form
  • To make ‘subGridAccounts’ grid as Editable, Double click the grid to open ‘Properties’
  • Add ‘Editable Grid’ Control. You can add Grid events too.
Configure- editable sub-grid

Configure- editable sub-grid

  • Editable Sub Grid looks as below
Sub-grid on form

Sub-grid on form

Refer MSDN for more info.

🙂

Advertisement

Rollup View – Relationship Behavior

November 5, 2016 1 comment

In Dynamics 365, a new ‘Rollup View’ relationship behavior has been introduced, which allows activities of the related entity would show up in ‘Activity Associated View’ of the primary entity.

Rollup-view-options

Rollup-view-options

To explain this better,

  • I created a custom entity ‘Bike’ which has 1:N relationship with ‘Contact’ entity.
  • I set ‘Relationship Behaviour’ -> ‘Rollup View’ as ‘Cascade All’
Rollup-view-configuration

Contact and Bike Relationship

  • I added a new Bike ‘Ducati’ to Contact ‘Adrian Dumitrascu’ and created a Task ‘Paint …’ for the ‘Ducati’ bike.
Contact-bike-activity

Contact – Bike – Task

  • As I set the ‘Rollup View’ as ‘Cascade All’ between ‘Contact’ and ‘Bike’, I get the Bike’s Task activity under my Contact’s ‘Activity Associated View’.
Contacts-related-entity-activities

Contacts-related-entity-activities

 

‘Rollup View’ can be set as ‘Cascade All’ only, if following conditions are met

  • The primary and the related entity must have either I:N or N:l custom relationship.
  • The flag can’t be set on any out-of-the-box system relationships.
  • The primary entity for the relationship must be Account, Contact, or Opportunity, as these are the only entity forms where the Activity Associated View appears.
  • The related entity must have ‘Activities’ options enabled in Customizations.

🙂

Categories: Dynamics 365 Tags: