Wednesday, October 30, 2013

How to install Ready-to-Use business processes in CRM 2013

Microsoft Dynamics CRM 2013 provides Ready to use Business Processes and it is as simple as we install sample data in CRM. To use this feature please follow the below steps:

To install the Ready to use processes, Navigate to Settings -> Data Management -> Under Data Management you can see the Option “Add Ready To Use Business Processes” as shown below.



When you click on this option you will get the below window and click Add button to add the business processes to your system.


  

After hitting the “Add” button wait for some time to install the business processes to your environment.


 
This process basically installs a Managed Solution called “BusinessProcesses”, you can see this solution in the Solution component as shown in below screen shot.




Following business process flows and some workflows get installed after completing this.









Hope this article helps!

 

Thursday, October 24, 2013

Access Teams in CRM 2013

This is another new feature addition in CRM 2013.

What are Access Teams?

In the previous versions of CRM record could be shared to other users or team to provide them access to the records. While sharing the records you could specify the permissions provided to the shared users to that record. The shortcomings here were either you add one user at a time and then specify the permissions for each user at the time of adding (repetitive work) or else pre-create teams and then share the record with the team. If you had a dynamic setup where you could have different set of users working on different records, it would require creating of those many teams to use team sharing. This was not a feasible idea.

Access Teams are based on these same concepts but without the limitations of the earlier Share options.

You can user Access Teams to provide access to records to more than one user and have teams created on the fly as the users are added.

How does it work?

  • Enable the Access Team feature for the desired entity.




  • Define the Access Team Template


         Navigate to Settings --> Administration --> Access Team Templates


In the Access Template you define the permissions to be assigned to the users selected for this Access Profile



The entity will only list those entities for which the Access Team feature is enabled.

You can create multiple templates for any entity. You can then select appropriate template on the entity form.

Add the Access Teams grid on the desired entity form.

Add a subgrid control and set the following properties.


In the Team Template select the Access Template that would like to apply.

All users included in the team grid would be controlled by the access template selected for the grid and would be provided permissions accordingly.

If a user that has user level access permission logs in, they would still be able to view records that were made accessible to them through the Access Teams.

The Team profile defines the privileges assigned.


Behind the scenes
 
  • For every record that you assign team members, a team record is created. So it creates one team per record.
 
  • The team type for this record is set to Access
 
  • The team name is auto generated by concatenating the entity record + the access template record id.
 



Programmatically Add/Remove users from a records Access Team

Read the Access Template ID using the Template name.

The entity that stores Access Template is “teamtemplate

                   //  Query using ConditionExpression and FilterExpression
                    ConditionExpression condition = new ConditionExpression();
                    //attribute name add to condition
                    condition.AttributeName = "teamtemplatename";
                    //operator add to condition
                    condition.Operator = ConditionOperator.Equal;
                    //values added to condition
                    condition.Values.Add(_accessTeamTemplateName);

                    // filter creation
                    FilterExpression filter = new FilterExpression();
                    //condition added
                    filter.Conditions.Add(condition);
                    //   create query expression
                    QueryExpression query = new QueryExpression("teamtemplate");
                    //filter added to query
                    query.Criteria.AddFilter(filter);

                    //retrieve all columns
                    query.ColumnSet = new ColumnSet("teamtemplatename");

                    // execute query which will retrieve the Access team teamplate
                    accessTeamColl = service.RetrieveMultiple(query);


Add user to the Access Team for a record

       //Request to create the Access team and add the user in that access team
                   AddUserToRecordTeamRequest adduser = new AddUserToRecordTeamRequest()
                    {
                        Record = entityToAdd,

                        SystemUserId = UserId,
                        TeamTemplateId = teamTemplateId
                    };
                    // Execute the request.
                   AddUserToRecordTeamResponse response = (AddUserToRecordTeamResponse)service.Execute(adduser);

Similarly you can use the RemoveUserFromRecordTeamRequest to remove users from a particular records access team.


Monday, October 14, 2013

Merge forms in CRM 2013 form customizations


If you have upgraded from CRM 2011 to CRM 2013 you may have noticed that the forms in 2013 has been redesigned with the new look. After upgrading to CRM 2013 from CRM 2011, the Information form or any other classic form for any entity will be taken over to 2013. Moreover, if you have setup a new fresh CRM 2013 and want to use the classic Information form, you can see that in “Inactive” state as you can see in the below screen shot.


If you would like to use these forms in a new UI then you a new feature introduced in CRM 2013 would be very helpful for you. When you customize an entity form you will see a button called “Merge Forms” as highlighted below. 
 
 
The feature of this form is simply merging of forms with an existing form from an earlier version of CRM. Hence you can only use this feature on a 2013 forms. When you click on this button you will get the below lookup window which lists ALL THE CLASSIC forms that you have in your system irrespective of the form state.



Once the form is merged you will see the merged content at the end of the current form.

Changes you can see after merge forms:

  1. It will carry over all the previous java script libraries along with their registered events on the current form 
  2. All the tabs from the existing forms will get appended in the current form just after the previous tabs as highlighted below

3.  Once the form gets merged the header/footer fields of the previous form will get added under a new tab called “Information Header” or “Information Footer” as highlighted below.



In Addition to this, you cannot display more than 4 fields in the form header and as soon as you add fifth field you will see the below notification.


 
The process of Merging forms will save lot of time if you wish to use your previous form design back to new 2013 forms instead of re-designing it manually.