Menu Close

Blog

Slide 1

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

Slide 2

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

Slide 3

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

previous arrow
next arrow

EDITABLE GRIDS DYNAMICS 365

Editable Grid was released as a new feature in Dynamics 365. I would like to explain some of the core concepts of the editable grid advantages and disadvantages.

1. What is editable grid?

It’s a custom control on an entity. It’s not enabled out of the box for any entity, you have to set it up. It’s easy (see below). It allows you to amend values on a view inline without going into the form.

2. Once you set up editable grid for an entity, can you still use the traditional read only views?

Yes. Once you set it up on an entity, you can toggle back and forth from editable to read only grid via a ‘Show as’ button on the view command bar.
image

3. Can it be used on out of the box and custom entities?

Yes

4. Can it be used on personal views?

Yes

5. Can it be used on mobile clients?

Yes, both tablet and phone. In fact, when you enable it, you enable for web, tablet and phone all together.

6. Can you apply it to just some view on an entity and not others?

Not exactly. It is set up at either entity or form level (i.e. applies to a specific subgrid). But you can’t just apply it to some views on an entity and not others.

7. How do you set it up?

In Customisations, in the entity configuration screen, there’s a new tab called ‘Controls’.
image
Select ‘Add control’ and select the type you want, in this case, obviously ‘Editable Grid’.
image
Don’t forget to save your changes. Then publish.
Please also note that it seems it is possible to add multiple editable grids to the same entity, but this would appear to be a bug, as it seems to have no impact. Of course, it only makes sense to have 1 editable grid control per entity.

8. What can you do on an editable grid?

You can (and this list is not exhaustive):
Change values on the view columns, obviously. See example below where I’m about to change the email field for Abraham McCormick.
image
Move columns around in the view by dragging and dropping. Please note, these persist across sessions, and users, i.e. if I move a column, it is moved for all users, and will still be like that when I log out and back in again. Not sure I like this functionality, particularly the fact that it moves it for all users.
Group records by a column in the view. Below, I’ve grouped by Company Name, and collapsed the contacts attached to no company and to A.Datum.
image
Again, these changes persist across sessions and users. Please note, you can enable editable grid for an entity but disable grouping if you want. Not sure why you would ever do this though.

9. What can’t you do on an editable grid?

You can’t (and again this list is not exhaustive):
Select a lookup field on a view and be taken to that record. It’s not a link, like it is in read only grid.
Change the owner of a record – this is still done through ‘Assign’ on the command bar. As you can see it is locked:
image
Change a value on a field of a parent entity, e.g. phone number of parent account on an editable grid of contacts. As you can see below, it’s locked:
image
Click to call phone numbers. Again, they’re not links. When you click on them, you can change them, but not call them.
image
Click to send email. Again, they’re not links.
Change customer lookups (you can change all other lookups on the primary entity).
image
Change composite fields, e.g. full name:
image
You can of course list out each component of the composite field in their own columns and change those individually.
Change party list fields.
See more than 25 records per page, regardless of your personal setting for records per page, unless you use the grouping function, in which case it will respect your personal options for records per page.
Perform a secondary sort, unless the grid is grouped, in which case you can do a maximum of 2 levels of sorting (unlike read only grid where you can sort by many columns).
See how many records are in the view, i.e. there is no record count at the bottom. You just see this for paging back and forth:
image

10. Can you set an entity to default to editable or read only grid?

Yes you can. You create the control for editable grid, and then select whether you want the default to be editable grid or read only grid for each client, i.e. web, phone or tablet. In the example below, I’ve set the default for web client to be editable grid, but for phone and tablet to be read only grid.
image
Please note, if you go to another entity and then back, you will be taken back to the grid type you were on when you left, not your default. However, if you sign out of CRM and back in, you will be taken to your default. So, the default grid type is only for when you first view that entity in a new session.
This isn’t an exhaustive list of editable grid’s features and limitations, but it’s a decent start.
Share this:

ROLLUPS AND CALCULATED FIELDS LIMITATIONS IN DYANMICS CRM

MICROSOFT DYNAMICS CRM ROLLUP AND CALCULATED FIELDS LIMITATIONS:

Calculated fields specifically are subject to the following limitations :
  1. Can only go one level up in an N:1 relationship
  2. Can only have all ANDs or all ORS in conditional logic.
  3. Not available for offline
  4. Calculations only refresh OnSave of the Form
Rollup fields are subject to the following :
  1. Only available using a single directly related 1:N related entity (Opportunity and Opportunity Products for instance)
  2. Rollup using another rollup field is not supported.
  3. Rollups are asynchronous and so the latest value will not always be available if changes are made to child records.
Share this:

DYNAMICS 365 CHART TYPES

DYNAMICS 365 CHART TYPES

CHART ARE USED TO QUICKLY VIEW THE  INFORMATION.

COLUMN CHART
BAR CHART
AREA CHART
LINE CHART
PIE CHART
FUNNEL CHART
MULTI-SERIES CHART
COMPARISON CHART(STACKED CHART)
TAG CHART
DOUGHNUT CHART

Share this:

PLUGIN REALTIME SCENARIO FOR DYNAMICS 365

Prequisites


1) create  field on opportunity form
2) structure of the plugin crm explorer add steps  and register the image
(using plugin registration tool, as developer tool kit have bug at this  moment.)
3)update of attribute of approval status on opportunity entity to test the  scenario.

Create a new field  optionset as approval status on  opportunity entity with optionset values as
 Submitted                  =   100000000 
 Pending approval     =    100000001 
 Approved                 =      100000002


1)Condition when Approval status changes from Pending approval to Approved.

2)Share the record with  a system  user  with  read access only.

3)Find out how to share the record to system user using plugin….. 

#GrantaccessRequest 
#PostImage

I am using Developer toolkit for visual studio 2013 for this plugin.. 

Plugin code here

// <copyright file=”PostOperationopportunityUpdate.cs” company=””>
// Copyright (c) 2017 All Rights Reserved
// </copyright>
// <author></author>
// <date>3/16/2017 5:10:33 PM</date>
// <summary>Implements the PostOperationopportunityUpdate Plugin.</summary>
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
// </auto-generated>

using System;
using System.ServiceModel;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;

namespace CrmPackage1.Plugins1
{

    /// <summary>
    /// PostOperationopportunityUpdate Plugin.
    /// Fires when the following attributes are updated:
    /// new_approvalstatus
    /// </summary>    
    public class PostOperationopportunityUpdate : PluginBase
    {
        /// <summary>
        /// Initializes a new instance of the <see cref=”PostOperationopportunityUpdate”/> class.
        /// </summary>
        /// <param name=”unsecure”>Contains public (unsecured) configuration information.</param>
        /// <param name=”secure”>Contains non-public (secured) configuration information. 
        /// When using Microsoft Dynamics 365 for Outlook with Offline Access, 
        /// the secure string is not passed to a plug-in that executes while the client is offline.</param>
        public PostOperationopportunityUpdate(string unsecure, string secure)
            : base(typeof(PostOperationopportunityUpdate))
        {

            // TODO: Implement your custom configuration handling.
        }


        /// <summary>
        /// Main entry point for he business logic that the plug-in is to execute.
        /// </summary>
        /// <param name=”localContext”>The <see cref=”LocalPluginContext”/> which contains the
        /// <see cref=”IPluginExecutionContext”/>,
        /// <see cref=”IOrganizationService”/>
        /// and <see cref=”ITracingService”/>
        /// </param>
        /// <remarks>
        /// For improved performance, Microsoft Dynamics 365 caches plug-in instances.
        /// The plug-in’s Execute method should be written to be stateless as the constructor
        /// is not called for every invocation of the plug-in. Also, multiple system threads
        /// could execute the plug-in at the same time. All per invocation state information
        /// is stored in the context. This means that you should not use global variables in plug-ins.
        /// </remarks>
        protected override void ExecuteCrmPlugin(LocalPluginContext localContext)
        {
            if (localContext == null)
            {
                throw new InvalidPluginExecutionException(“localContext”);
            }

            // TODO: Implement your custom Plug-in business logic.

            Entity opp = (Entity)localContext.PluginExecutionContext.InputParameters[“Target”];
           
            if (opp.LogicalName != “opportunity”)
                return;
            else
            {
                if (localContext.PluginExecutionContext.PostEntityImages.Contains(“PostImage”) && localContext.PluginExecutionContext.PostEntityImages[“PostImage”] is Entity)
                {
                  

                    Entity postImage = (Entity)localContext.PluginExecutionContext.PostEntityImages[“PostImage”];
                    if (postImage.Attributes.Contains(“new_approvalstatus”))
                    {
                        
                   //submitted->approved
                        //submitted->
                    OptionSetValue OPT = new OptionSetValue();
                    OPT = (OptionSetValue)postImage.Attributes[“new_approvalstatus”];
                    
                    //100000000
                    if (OPT.Value==100000002)
                    {
                        //Share record

                        #region get user details
                        String fetchXml = @”<fetch version=’1.0′ output-format=’xml-platform’ mapping=’logical’ distinct=’false’>
                                      <entity name=’systemuser’>
                                        <attribute name=’fullname’ />
                                        <attribute name=’businessunitid’ />
                                        <attribute name=’title’ />
                                        <attribute name=’address1_telephone1′ />
                                        <attribute name=’positionid’ />
                                        <attribute name=’systemuserid’ />
                                        <order attribute=’fullname’ descending=’false’ />
                                        <filter type=’and’>    
                                          <condition attribute=’internalemailaddress’ operator=’eq’ value=’dilipkumar@gmrltd.onmicrosoft.com’ />
                                        </filter>
                                      </entity>
                                    </fetch>”;
                        //THis will convert in Query base 
                        FetchExpression query = new FetchExpression(fetchXml);

                        EntityReference teamReference = new EntityReference();
                        EntityCollection entcollection = localContext.OrganizationService.RetrieveMultiple(query);

                        for (int i = 0; i < entcollection.Entities.Count; i++)
                        {
                             teamReference = new EntityReference(“systemuser”, entcollection.Entities[i].Id);

                        }
                        #endregion

                        #region Share record with read access
                        GrantAccessRequest grantAccessRequest = new GrantAccessRequest();
                        grantAccessRequest.Target = new EntityReference(opp.LogicalName, opp.Id);

                        PrincipalAccess principalAccess = new PrincipalAccess();
                        principalAccess.AccessMask = AccessRights.ReadAccess;
                        principalAccess.Principal = teamReference;

                        grantAccessRequest.PrincipalAccess = principalAccess;

                        GrantAccessResponse grantAccessResponse = (GrantAccessResponse)localContext.OrganizationService.Execute(grantAccessRequest);
                        #endregion
                    }
                    }
                    else
                    {
                        return;
                    }
                }
            }
        }
    }
}

Please make sure the user should have minimum level security role on  opportunity entity 
Entity should be created as access level “user/team”.
In my case i have system entity “opportunity entity” which is organisation wide access level.Then i have changed the system user access level to the opportunity in the security roles.
The above plugin code is working perfectly fine..
I hope this helps someone..
Happy CRMing.
Share this: