Showing posts from November, 2014

Manipulate date fields by adding or subtacting days to a DateTime fields in Microsoft Dynamics CRM using workflow activity

Source: ManipulationLibrary

In this blog I am going to explain how to manipulate a date field in Dynamics CRM 2013 using plugin workflow activity.

This workflow allows days to be added/ subtracted to date field in CRM.

1. For creating this Workflow activity using plugin Open Visual studio and just proceed similarly as you do for creating any plugin i.e add necessary references, etc.

2. Now add a class file for and name it accordingly and add below code for Adding days to date::

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Activities;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;

namespace AddSubtractDate
    public sealed class AddDays : CodeActivity
        protected override void Execute(CodeActivityContext executionContext)
            var result = new DateTime();
            var start = StartDate.Get<DateTime>(executionContext);

            if (start != DateTim…

Create Nested Gridview with Expand and Collapse features in ASP.Net

In this blog, I am going to show how we could create a nested gridview i.e gridview inside another gridview. The feature of this nested group is that the sub-grid will be hidden by default and when user clicks on "+" sign provided in Main gridview the subgrid will be shown to the user and "+" sign gets converted to "-" sign and again if user click "-" sign the subgrid gets hidden. The motive behind this is to show the detailed specification of particular record on click of button instead showing all records in a single grid.

Additionally a small javascript has been used inside this code for attractive warning message, you may ignore that portion.

First of all, add the below code inside the .aspx code window::

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NestedGridview.aspx.cs" Inherits="NestedGridview" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:…

ConditionExpression operators and aggregation used in FetchXML while using c# for Microsoft Dynamics CRM 2013

This blog contains the whole list of COndition operators used in FetchXMl and the aggregation used in FetchXML while using C#

Source: MSDN

Here is a list of all ConditionalOPerator and the second table contains the list of aggregation used in FetchXML::

ConditionOperatorFetchXML OperatorDescriptionBeginsWithlikeThe string occurs at the beginning of another string.BetweenbetweenThe value is between two values.ContainslikeThe string contains another string.DoesNotBeginWithnot-likeThe string does not begin with another string.DoesNotContainnot-likeThe string does not contain another string.DoesNotEndWithnot-likeThe string does not end with another string.EndsWithlikeThe string ends with another string.EqualeqThe values are compared for equality.EqualBusinessIdeq-businessidThe value is equal to the specified business ID.EqualUserIdeq-useridThe value is equal to the specified user ID.EqualUserTeamseq-userteamsThe record is owned by teams that the user is a member of.GreaterEqualgeThe value…
go to top image