Dynamics 365 – What does Include entity metadata do

 

Man’s greatness lies in his power of thought. ~ Blaise Pascal

As the functionality in Dynamics 365 grows I find there are more options and check boxes which I have no idea what they do, today I came across a check box called Include entity metadata

appointment-no-metadata-0

Dynamics 365 developers should not be comfortable using functionality you don’t fully understand because it could cause you problems later and sometimes once you enable a setting it cannot disabled, such as setting entities values

  • Business process flows
  • An entity being an activity
  • Connections
  • Queues
  • Activities

Entity ownership can cause problems when you need to apply security to organisation entity – CRM Entity ownershipHow do you decide?, you need to get the decision right first time or don’t make it organisational if you think there is a chance it will need security.

Dynamics professionals are craftsman (Are you a Dynamics Craftsman or a CRM developer?) their main tool is Microsoft Dynamics 365/CRM.  You must become a master of Dynamics 365 and understand the nuances, limitations and capabilities.

If you don’t understand certain functionality, work out how it works and the underlying logic, keep asking questions until you can explain it to someone else.

Dynamics CRM/365 developers you should use the SDK rather than Google and you should always start with SDK.

Metadata

Dynamics 365/CRM metadata has the potential to confuse people because it can prove a slippy subject for people to grasp and when explaining it you end up saying things like “it is data about data”.

To understand how metadata works in Dynamics CRM/365 read this article – CRM 2015 – Understanding CRM Metadata 

A quick explanation on field metadata such as (I am only going to list some of the more interesting fields available not all of them)

  • LogicalName
  • DisplayName
  • SchemaName
  • AttributeType
  • IsAuditEnabled
  • IsRenameable
  • IsManaged
  • IsPrimaryId

A field itself holds  a value but the metadata is

  • Display name
  • is it audited
  • is it a manged field

The metadata doesn’t affect the value of the field but it changes the way it interacts with Dynamics 365.

What is entity metadata

If there is a checkbox for entity metadata, we need to understand what metadata there is for an entity.

On the entity form in the solution, the entity metadata is all the check boxes like notes, activities, queues, access teams etc.  When this gets broken down in the solution packager to an xml file you can see all these check boxes have a field and a value.

entity-metadata

When you don’t select include metadata The entity name in the entity xml element

appointment-no-metadata

If you select to include metadata you get the metadata

<EntitySetName>appointments</EntitySetName>
<IsDuplicateCheckSupported>1</IsDuplicateCheckSupported>
<IsBusinessProcessEnabled>1</IsBusinessProcessEnabled>
<IsRequiredOffline>0</IsRequiredOffline>
<IsInteractionCentricEnabled>1</IsInteractionCentricEnabled>
<IsCollaboration>1</IsCollaboration>
<AutoRouteToOwnerQueue>0</AutoRouteToOwnerQueue>
<IsConnectionsEnabled>1</IsConnectionsEnabled>
<IsDocumentManagementEnabled>0</IsDocumentManagementEnabled>
<IsOneNoteIntegrationEnabled>0</IsOneNoteIntegrationEnabled>
<IsKnowledgeManagementEnabled>0</IsKnowledgeManagementEnabled>
<IsSLAEnabled>0</IsSLAEnabled>
<IsDocumentRecommendationsEnabled>0</IsDocumentRecommendationsEnabled>
<OwnershipTypeMask>UserOwned</OwnershipTypeMask>
<IsAuditEnabled>0</IsAuditEnabled>
<IsActivity>1</IsActivity>
<ActivityTypeMask>CommunicationActivity</ActivityTypeMask>
<IsActivityParty>0</IsActivityParty>
<IsReplicated>1</IsReplicated>
<IsReplicationUserFiltered>1</IsReplicationUserFiltered>
<IsMailMergeEnabled>0</IsMailMergeEnabled>
<IsVisibleInMobile>1</IsVisibleInMobile>
<IsVisibleInMobileClient>1</IsVisibleInMobileClient>
<IsReadOnlyInMobileClient>0</IsReadOnlyInMobileClient>
<IsOfflineInMobileClient>1</IsOfflineInMobileClient>
<DaysSinceRecordLastModified>10</DaysSinceRecordLastModified>
<MobileOfflineFilters>
&lt;fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”false”&gt;
&lt;entity name=”appointment”&gt;
&lt;filter type=”and”&gt;
&lt;condition attribute=”modifiedon” operator=”last-x-days” value=”10″/&gt;
&lt;/filter&gt;
&lt;/entity&gt;
&lt;/fetch&gt;
</MobileOfflineFilters>
<IsMapiGridEnabled>1</IsMapiGridEnabled>
<IsReadingPaneEnabled>1</IsReadingPaneEnabled>
<IsQuickCreateEnabled>0</IsQuickCreateEnabled>
<SyncToExternalSearchIndex>1</SyncToExternalSearchIndex>
<IntroducedVersion>5.0.0.0</IntroducedVersion>
<EnforceStateTransitions>0</EnforceStateTransitions>
<EntityHelpUrlEnabled>0</EntityHelpUrlEnabled>
<ChangeTrackingEnabled>1</ChangeTrackingEnabled>
<IsEnabledForExternalChannels>0</IsEnabledForExternalChannels>
<HasRelatedNotes>True</HasRelatedNotes>
</entity>

In the solution file you can also see what happens when you untick

<RootComponent type=”1″ schemaName=”appointment” behavior=”1″ />

not ticked

<RootComponent type=”1″ schemaName=”appointment” behavior=”2″ />

Why and the When?

This functionality and check box was added with the subcomponents functionality.  Before CRM 2016 you added the whole entity, forms, views and everything else to a solution file.  CRM 2016.

You can only use subcomponents if the environment you are importing your solutions to includes the metadata.

In the blog post CRM 2016What’s the best way to organise solutions in Microsoft Dynamics CRM I discuss the different ways you can organise solutions.

If you choose a base solution method, you might have solutions imported into development environments as managed (to stop dependencies being created for them).   You may then build on top of the base solution in separate environment and solution.  You could add a managed entity, bring in no existing subcomponents and only add new fields.  In this scenario you new solution wouldn’t need the entity metadata because it exists in the core solution.

Conclusion

It turned out to be obvious what was happening but it’s better to confirm you assumptions and don’t give them time to cause you problems.

Writing this post has helped me think through the process of building customisations on top of managed solutions

 

Advertisements

CRM 2016 – ActivityParty and ActivityParty Lists

To code simply you must master complexity and break it down to it’s simpliest form #HoskCodeWisdom

Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it. Alan Perlis

Junior developers create many lines of code and complexity, senior developers then remove lines of code and simplify #HoskCodeWisdom 

The ActivityParty entity catches many new Dynamics 365/CRM developers by surprise because it’s an entity inside an entity.  This blog post looks at ActivityParty and some great resources to help you conquer it.

To spice up CRM development Microsoft likes to throw in a few special entities that have special powers.  Microsoft have created great documentation but then littered it around so it’s hard to piece all the useful bits together.

There are special non standard entities lurking in CRM, this can catch out new developers because they are not standard, they can also annoy some people because we can’t make them
  • Customers (which can hold accounts and contacts)
  • ActivityParty (can hold any of the activity types)
  • regarding (can hold any object)
  • Owner – it can be a user or a team
  • Address entity, it’s half on the account, contact form but you can see it in advanced finds

I got an odd error once with ActivityParty and casting

The ActivityParty is complex record,  its important to understand how it’s linked to Activities,  Microsoft have some excellent documentation here

http://msdn.microsoft.com/en-us/library/gg309626.aspx

This picture quickly summaries ActivityParty

Richard Knudson has a great blog post on ActivityParties

 

First step go to the MDSN definition

http://msdn.microsoft.com/en-us/library/gg328549.aspx

An activity party represents a person or group associated with an activity. An activity can have multiple activity parties.

Where are party lists used?  The most common area in CRM Activity Party is used is the To and From on an email.   The reason the ActivityParty is used is because an email can have multiple email addresses in the TO, CC (it’s a party of people)

Email is a easy way to understand not only how Activity Lists work but why we need them.  The TO field on an email might contain multiple email addresses.  

It also explains the name, each person on an email is an activity party and an activity party is a person or group.

As mentioned before an ActivityParty entity can hold many different entities, to see what type it is you need to check the Activity Party Type

There are 11 activity party types in Microsoft Dynamics 365. The different types are identified by the a different int value as shown below from MSDN documentation.

Activity party type Value Description
Sender 1 Specifies the sender.
ToRecipient 2 Specifies the recipient in the To field.
CCRecipient 3 Specifies the recipient in the Cc field.
BccRecipient 4 Specifies the recipient in the Bcc field.
RequiredAttendee 5 Specifies a required attendee.
OptionalAttendee 6 Specifies an optional attendee.
Organizer 7 Specifies the activity organizer.
Regarding 8 Specifies the regarding item.
Owner 9 Specifies the activity owner.
Resource 10 Specifies a resource.
Customer 11 Specifies a customer.
From the list above the ActivityParty is used with activities –
  • emails
  • appointments
  • phone calls
  • letters
  • faxes.
Not all of the Activity Party types can be used with all all the activities.  e.g. appointments have Organizers, OptionalAttendee, RequiredAttendee but this wouldn’t work with emails.

The following table lists the activity party types that are supported for each activity, and the corresponding activity properties to specify those activity party types. ActivityParty entity

Activity entity name Supported activity party type Activity attribute
Appointment OptionalAttendee
Organizer
RequiredAttendee
Appointment.OptionalAttendees
Appointment.Organizer
Appointment.RequiredAttendees
CampaignActivity Partner
Sender
CampaignActivity.Partners
CampaignActivity.From
CampaignResponse Customer
Partner
From
CampaignResponse.Customer
CampaignResponse.Partner
CampaignResponse.From
Email BccRecipient
CcRecipient
Sender
ToRecipient
Email.Bcc
Email.Cc
Email.From
Email.To
Fax Sender
ToRecipient
Fax.From
Fax.To
Letter BccRecipient
Sender
ToRecipient
Letter.Bcc
Letter.From
Letter.To
PhoneCall Sender
ToRecipient
PhoneCall.From
PhoneCall.To
RecurringAppointmentMaster OptionalAttendee
Organizer
RequiredAttendee
RecurringAppointmentMaster.OptionalAttendees
RecurringAppointmentMaster.Organizer
RecurringAppointmentMaster.RequiredAttendees
ServiceAppointment Customer
Resource
ServiceAppointment.Customers
ServiceAppointment.Resources

Reading a Resource

In this example I will be reading the resources value
 
ServiceAppointment.resources can hold multiple resources
 
the field value is IENumberable but I like to convert it into a list

List<ActivityParty> resources = (List<ActivityParty >)serviceAppointment.Resources.ToList();

On the front end resources can contains users or Facility/equipment.  For those of you haven’t used the scheduling side of Microsoft (I only know about it because you are tested on it for the applications certification and it has been useful to understand how it works as potential customers have asked about it)
 
in my example, if want to display some details about the facilities/equipment and ignore people (they don’t have exciting details!)
 
So after capturing the resources in 
 
The participationTypeMask = 10, which is a resource.
 
There are two guids, ID’s
ActivityPartyId
 
PartyId
 
The ActivityPartyID is the guid of the ActivityParty, the PartyID is the guid of the resource selected (e.g. user or facility/equipment).  
 
In my code I want to check the PartyID, see if it’s a piece of equipment (not user) and if it is lookup the details for 
For an in depth example go to
Some more useful information can be found in the links below

In Praise of the Incomplete Dynamics 365 consultant

If you’re not making mistakes, then you’re not doing anything. I’m positive that a doer makes mistakes. John Wooden

We are what we repeatedly do.  Excellencethen, is not an act, but a habit. Aristotle

During dynamics CRM projects there are many scenarios when something goes wrong.  Mistakes shouldn’t surprise us, CRM projects are complex, involving multiple people, processes and goals.

A project is organised chaos, setbacks and mistakes can lower affect the morale of the team but when mistake’s are opportunity to make strategic decisions to put the project back in the right direction, ensuring you are delivering the business goals

Don’t be surprised when mistakes happen during a Dynamics 365 project, be prepared #HoskWisdom 

Complexity 

In the excellent book The Mythical Man-month: Essays on Software Engineering Brooks challenges adding more people to a project to shorten time scales, highlighted by this quote

Adding manpower to a late software project makes it later.”
― Frederick P. Brooks Jr.Mythical Man-Month, The: Essays on Software Engineering

In the Mythical man-month Brooks discusses communication overhead, described here  Brooks Law

Communication overheads increase as the number of people increases. Due to combinatorial explosion, the number of different communication channels increases rapidly with the number of people. Everyone working on the same task needs to keep in sync, so as more people are added they spend more time trying to find out what everyone else is doing.”

Microsoft Dynamics 365 CRM projects meet project complexity overhead when a team works on different parts of a project becoming difficult to understand what other people are doing and how their information affects the CRM project.

The book The Checklist Manifesto: How to Get Things RightAtul Gawande examines complexity and knowledge.  A problem doctors face is not having the required knowledge to cure patients but understanding what treatment should be used among a list of possibilities.  The increase in medical understanding has doctors struggling to make the correct diagnoses in time.

“sometime over the last several decades—and its only over the last several decades—science has filled in enough knowledge to make ineptitude as much our struggle as ignorance.”

― Atul GawandeThe Checklist Manifesto: How to Get Things Right

Microsoft Dynamics 365 projects involve teams working on different partscollecting customers’ requirements and creating technical solution. The difficult to create CRM solutions aligned with business requirements, constraints and limitations required by the business, it’s a great breeding ground for mistakes and missteps.

Microsoft Dynamics 365 projects have many moving pieces with different directions and purposes.  You can’t focus on each piece because you need to understand the whole picture and overall strategy.  Dynamics 365 projects focus on many tasks and trying to understand the overall strategy can lead to mistakes because it‘s difficult to focus on many parts of a project with the same intensity.

Think like a datacentre

data center must not fail to keep within it‘s 99.9% uptime promise,  when failure occurs, it must recover because that what the customers pay for.

Microsoft Azure’s data centres need a strategy not to avoid hardware failure but to cope with hardware failure and not lose service.  Microsoft Azure allow you to choose different availability sets to reduce the likely hood of your servers being on the same rack, datacentre and country.

I’m not suggested you work on a project with the aim to fail but you should be prepared there will be mistakes and you must learn from them and not let mistake turn into failure.

Incomplete Leader

The article the In praise of the incomplete leader https://hbr.org/2007/02/in-praise-of-the-incomplete-leader inspired me to write a CRM version, the quote below gives a flavour.

It’s time to end the myth of the complete leader: the flawless person at the top who’s got it figured out. The sooner leaders stop trying to be all things to all peoplethe better off their organizations will be

The leader’s job is no longer to command and control but to cultivate and coördinate the actions of others at all levels of the organization. Only when leaders come to see themselves as incomplete—as having both strengths and weaknesses—will they be able to make up for their missing skills by relying on others.

Incompleteness and Dynamics 365 Professionals

Incompleteness is a fact of life in the Microsoft Dynamics CRM professional, we
  • Incomplete requirements
  • Incomplete solutions
  • incomplete code
  • Incomplete knowledge
  • Incorrect estimates
  • incomplete knowledge of the project due to communication overhead issues + time issues

Customers expect dynamics 365 consultants and developers to be experts Microsoft Dynamics 365, Dynamics 365 professionals expect customers to be experts in their business, capturing their requirements, limitations and complexities of their business.

There is too much to knowtoo many distractions, not enough time in an IT project.  During a project mistakes are likely, we can miss something, not collect all requirements and there is plenty of scope for misinterpreting the requirements.

We shouldn’t be surprised when things go wrong or off track because this happens with people, complex requirements, complex solutions.

Two things are important

  • communication
  • relationships

When you add the two factors together you get collaboration.  Collaboration is a vital ingredient to a successful project and if you have worked on an unsuccessful project, you will find problems in the relationship and communication which created an environment ineffectual collaboration

Internal collaboration

CRM professionals won’t know everything individually, to be effective you must use the experience, knowledge and ideas of your colleagues.  The size and breath of CRM and related services means no one CRM professional can have deep knowledge of all new CRM features and new products.

Group knowledge/experience is key to delivering projects which don’t implement customisation not suited to the business requirements or might cause problems later down the line.

One attribute of CRM professional is to know when to get help or delegate part of the project to someone who specialises in that area.

Four Capabilities

leadership as a set of four capabilities: sensemaking (understanding the context in which a company and its people operate), relating (building relationships within and across organizations), visioning(creating a compelling picture of the future), and inventing (developing new ways to achieve the vision).

Sensemaking

Business requirements must always drive solutions, if a CRM solution is not aligned to a customers business needs it won’t make a significant impact or deliver significant gains to the customer.  When gather requirements the key is to ask the right questions, to do this you have to understand the context of the company and how it operates.

Microsoft Dynamics CRM has generic functionality for sales, marketing, case management etc, most companies do not have generic requirements.  Companies want you to tailor the CRM solution to fit their individual way of working and their particularly business needs.

When gather requirements you must constantly relate them to the companies needs, goals to ensure you solution makes a business impact.

When demoing functionality the CRM professional must simplify the functionality to enable the user to understand what it does and how it works.  On the other side try to get the business users to simplify their requirements and remove any ambiguity.

Sometimes it‘s a case of the CRM professional keep working, understanding the business will help you understand the business requirements.  When you understand the reason behind a business requirement it‘s easier to understand and explain to other members of the team.

Relationships

A successful project builds on the foundation of a good working relationship between the users and the CRM professional.   During the project you spend time asking the team to do things for the project, the better your relationship the quicker and better the users will carry out those tasks.

The key to building a good relationship is to understand the users perspective and present information so they can understand it.  Encourage input and listen to their options.  Successfull projects are collaborations between the user (business knowledge) and the CRM team (technical CRM knowledge).  Unsuccessful projects occur is when one side is to dominate or doesn’t listen to the other sides opinion.

The article called the key point is you when you understand where the user is coming from you can relate to their business requirements and functionality needed.  CRM professionals will find customers can find it hard to relate to Microsoft Dynamics 365 functionality you should use the customers business language and terminology to help visualise the solution.

Solutioning

You gather requirements, user stories which you use to create a solution.  The features of the solution must be easily traced back to the business goals/objectives.  When creating a solution create a compelling vision of the future and sell this to the customer, they must believe this will make their working life better by helping them to their job more effectively.

When creating the solution get input from the business and technical experts with deep knowledge of Dynamics 365 functionality.  Feedback from business users and technical experts is vital at these stage, you must find flaws and problem areas.  A useful tool is a premortem where you predict the source of problems with the solution and investigate it.

The problems you find in the designing the solution are easier to fix before you started creating the solution.  Problems you find later means rewriting code or reworking a customisation as well as designing an alternative which fits the constraints of an existing solution.

Don’t let bugs get into production environments

Delivering

The customer needs to be prepared for the incomplete solution, it‘s this time when missed requirements, incomplete requirements and misunderstood requirements can distort the solution to not forefill the customers requirements.  Mmisaligned solutions are often assumptions not fully questioned.

A key part of delivering is to make sure the users get trained on the new system, customers can get frustrated and annoyed if they don’t understand how to use it.  The new system instead of helping them do their work, hinders the user because they can’t do something or it takes longer than the old familiar system.

Conclusion

Successfully delivering a project is an art not a science, you will make mistakes along the way.  A team delivers a project and the more people you have contributing the better it will be.

Projects must relate to the business goals, processes and the people who work there.  When project teams focus too much on technical solutions they can lose sight of the real purpose of the project and the CRM solution, help users archive business goals, which helps the business execute it‘s business strategy.

There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell

If someone does make a mistake, make sure they get given the Fail Fairy – The Fairy of failure – Who broke the build

Study tips for the Scrum Certification

 We don’t need an accurate document, we need a shared understanding – Jeff Patton

I became a certified Scrum master yesterday, I love the title of Scrum master, it’s by far the most silly title, mixing rugby and ninja skills. There could be some alternatives

  • Scrum Ninja
  • Scrum master general
  • Scrum lord
  • Head of Scrumperation
  • International Scrum
  • Michelin starred Scrum Vicar

Why get certified

Certifications can be divisive, people who aren’t certifications can get angry about the silliness of them and can be found shouting “They don’t mean anything“.

I heard a good quote “Scrum masters who are certified are usually crap

What we should remember is a certification doesn’t mean anyone is good at their job, it means they have studied on how a tool works, which is different from how to use a tool.

The benefits of certification

I am partial to getting certified because it gives a deadline and creates a sense of urgency around learning a topic.

Studying for a certification gives you a broad in-depth knowledge of a topic, it doesn’t guarantee you will use that knowledge or you good at your job.    If you view knowledge as a tool then it‘s your job to make sure you understand what the tool is, how it works and when to use it.

I have written about CRM certifications What are the benefits of CRM certifications

Tips on passing the PSM 1 certification

The scrum guide has all the answers, the certification is multiple choice questions based on a 16 page document.  Read this small document many times and make notes.

Here are some useful pages on passing the Scrum certification

This book was quite useful and it has some practice questions

Scrum Narrative and PSM Exam Guide: All-in-one Guide for Professional Scrum Master (PSM 1) Certificate Assessment Preparation

Test yourself

I view studying for a certification as two steps, the first step is learning theory and ideas and the second step is testing yourself to reinforce the knowledge and be able to retrieve it at will.

Once you have read about Scrum you need to keep testing yourself until you can recall the information easily.

practice these exams until you get 100 percent (every time)

https://www.scrum.org/Assessments/Open-Assessments

15 questions

http://www.bostonagiletraining.com/Sample-Scrum-Master-Certification-Practice-Exam

Mikhail Lapshin 80 questions are great because they explain the answers by quoting the scrum guide.

PSM1 – Learning mode

finally this is a useful page on product owner

http://www.scrumcrazy.com/New+New+Product+Owner+-+The+Videos