Monday, March 13, 2017

Project Service Automation - Delegation UI and SDK Gotchas

A typical requirement for project management and time sheet systems is the ability to allow a manager to enter time sheets for team members. PSA supports this through the use of delegation records. A user can create a delegation record allowing another user to enter the hours they have worked on project tasks. Here I have created a delegation record for Joe Bloggs along with a  start and end date for when the delegation is allowed.



Now when I log on as Joe Bloggs from the Time Entry form I can switch users and add time entries for Joe Gill.





Delegation records are a bit cumbersome as the UI only allows a user to create delegation records for themselves and an administrator or project manager cannot create delegation records on behalf of another user. Also they can only be configured between two specifically named users. They cannot be configured in any type of generic or rule based fashion such as allowing a project manager to enter time worked for team members or allow membership of a team to give delegation rights. So entering delegate records for a large number of resources lends itself to improvement by writing some custom code using the SDK.

Monday, February 06, 2017

Project Service Automation - Work Hours Templates

Work hour templates in PSA are basically pointers to calendars for resources and projects that determine which days of the week are working days, the number of hours worked per day and if the business closures are to be observed. It is important to configure your work hours template before you use them with any projects otherwise your work breakdown structures and estimates will be incorrect.
 
PSA comes with a default work template which is configured for an 8 hour working day and not to observe business closures which may not suit your projects. Unfortunately there does not seem to be an obvious way to modify the default work template's calendar so the alternative is to create a new work hour template and to base the template on a resource's calendar by populating the template resource field.

Each resource in PSA has its own calendar and if the resource is a user the calendar can be accessed from the users Work Hours related view. Using this option a weekly schedule of working hours can be configured with the option to create schedules for individual days and also to enter time off.  Business closures can also be taken into consideration by checking the observe business closures check box. So here I configured for my own account to work 7 hours a day Mon to Fri and to observe business closures.

Monday, January 16, 2017

Project Service Automation - Project Templates

Project templates are a useful feature in Project Service Automation if you regularly manage the same types of projects which have similar tasks and resourcing requirements. You can create a project template with a work breakdown structure of tasks and dependencies and use this template for new projects. When you create a project using a template the work breakdown structure and team members from the template are copied across to the new project. Here is an example of a Project Template called Dynamics Implementation with four sequential tasks.


Tuesday, January 03, 2017

Project Service Automation - Price Lists

Project Service Automation is a fully featured Dynamics 365 application for the management of service based projects and includes features like estimating projects, tracking projects actuals and resource planning. There is not too much documentation available for Project Service Automation so I intent to blog about any nuggets I discover as I start to use it. In this first Project Service Automation post I am going to cover the different types of price lists and how they are used to populate a project estimates. I will also show you how to discover which price lists are being used in a projects estimates.



Saturday, December 17, 2016

Quick Tip - Turn Activity Feed Posts Off in Dynamics

Sometimes your clients not interested in using the Activity Feed Posts functionality in Dynamics. You can turn it off system wide in two simple steps. Firstly go to Settings -> Activity Feeds Configuration and filter all the Active records and Deactivate them.


Now goto Customization -> Default Solution and Publish all Customizations. You could do it for each entity if you prefer.


Once you refresh your browser cache the Posts tab on the activity pane will be hidden.





Monday, October 17, 2016

Message Listener with No Code Json Parsing

In this post I am going to show how you can configure a message listener in Dynamics CRM that will receive Json messages, parse the Json and create a record using the parsed data We are going to do all of this without any custom code.

First a bit of background on an unused corner of Dynamics CRM. Every activity record has a field called Additional Parameters which is designed to hold a Json payload. This is used by apps like Microsoft Social Engagement to automatically create CRM records from social media posts. The Json in the Additional Parameters field can be parsed and extracted by the record creation Rules.

We are going to create a record creation rule to create a contact record when an email is received by a queue and the rule will parse the Additional Parameter's Json and use the Json data to populate the contact fields. By using an email queue as our message transport mechanism we have ready made message listener. Details on how to create an email queue with an Office 365 shared mailbox here


Saturday, September 10, 2016

Simple Dynamics CRM Console Application

This is a quick tip on how to create a simple console application in C# that connects to Dynamics CRM 2016 and creates an account record. There is some sample  code in the SDK that demonstrates how to do this but this sample is even simpler.

static void Main(string[] args)
{
    // Get the CRM connection string and connect to the CRM Organization
    CrmServiceClient crmConn = new CrmServiceClient(ConfigurationManager.ConnectionStrings["CRM"].ConnectionString);
    IOrganizationService crmService = crmConn.OrganizationServiceProxy;
 
    Entity acc = new Entity("account");
    acc["name"] = "Joe's New Account";
    crmService.Create(acc);
                
}

Firstly create a new console application in Visual Studio and then go to the NuGet Package Manager option and install the Microsoft Dynamics CRM 2016 SDK Xrm Tooling Package.


Edit the app.config file in your project and add a connectionsStrings section with your CRM connection string.

  <connectionStrings>
    <add name="CRM" connectionString="AuthType=Office365;Url=https://joegilltest.crm4.dynamics.com; Username=joe@joegilltest.onmicrosoft.com; Password=MyPassword" />
  </connectionStrings>


Now add a reference to the System.Configuration assembly in your project so you can access your config file from code.



Add the following namespaces to your code

using System.Configuration;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Tooling.Connector;

Now add the code shown at the top to your main method. When you run your console application it will connection to CRM and create an account record.