locked
How to add column to entty Grid results dynamically in ms crm 2015? RRS feed

  • Question

  • Hi,

    I am having requirement to add column dynamically to entity grid results irrespective of selected view.

    So I wrote the below code and registered the plug-in in RetrieveMultiple message pre event.

    if (context.InputParameters.Contains("Query"))
                    {
                        if (context.InputParameters["Query"] is QueryExpression)
                        {
                            QueryExpression objQueryExpression = (QueryExpression)context.InputParameters["Query"];
                            objQueryExpression.ColumnSet.AddColumn("modifiedon");
                            context.InputParameters["Query"] = objQueryExpression;
                        }
                    }

    In the post event query s executing and giving the results along with field modifiedon which is recently added in pre-event.

    but somehow it is not reflecting in the UI side.

    Thanks & Regards,

    Baji Rahaman

     

    Friday, September 4, 2015 11:54 AM