How to add a subgrid in a crmForm for displaying related records in crm 2011

June 8, 2011 Leave a comment

CRM 2011 brings along really cool and easy to use features. Today we will talk  about one of them and that is, how to show a sub grid of a related entity on a master entity.

How does it help to show related entity grid on a CRM 2011 form?

The answer is simple, it is all about usability if you can see all the communication activities of a contact on the same form without clicking or going to a new tab isn’t it wonderful. It saves you time and improves user experience.

How to do it?

Let us take a scenario to answer this question. Suppose you have an entity in CRM 2011 by name Organization now you want to show all employees of this organization in a sub grid on organization entity. For doing so please follow the following steps

1- Go to your solution and open organization entity form as shown in the image below

Image 1

CRM 2011 Form Customization screen

Customization screen

2- Now goto insert tab in left top of the organization form as shown in image below.

 

 

3- Click on the subgrid button.

Image2

How to add Sub Grid

4- select tab  in which you want to add subgrid.

image3

5- After clicking on the subgrid button (that appears on the top of the form) you will see it requires the following

Name ,Label,checkbox for display label on the form and in the datasource section you can see

1- Picklist of records (select only related record ).

2- Entity picklist(for which you want to add picklist).

3.Picklist of different views you can select according to your need.Edit and New button are also available if you want to update or make a new view as per your requirements

Now you can select different checkbox from Additional options section according to your need

Image4

Hope this helps

Categories: CRM 2011 Tags:

How to call a web service using jquery?

June 4, 2011 1 comment

JQury is a really powerful library which can be used to do many task. Its moto is do more write less to do more.
In this post I will explain you how to call a Webservice using JQuery.

You can call a webservice function from jQuery too, but it’s a lot more harder and lot less fun. Here’s how you can do that.

1. Decorate your web-service / pagemethod with the [WebMethod] attribute so that they serialize to JSON (jQuery does not support WSDL).
2. Make only POST requests.
3. Send an empty JSON variable to the web service if you don’t have any arguments.

The $.ajax function of jQuery can be used to make the request at the client end. Here’s a sample

$.ajax({ url: “/webservice.asmx/DoSomething”,
type: “post”,
data: “{}”,
contentType: “applicatin/json; charset=utf-8”,
dataType: “json”,
success: function(result) {
alert(msg.d);
},
error: function(err) {
alert(“error!”);
}
});

Notice that in the success callback function we the reference is to msg.d and not to the msg itself. This is because ASP.Net wraps the JSON serialized data in a variable called ‘d’. It’s a convention to improve data security.

Categories: JQuery Tags:

Interesting difference between CSS Padding and Margin tags and innerText and innerHTML function

Have you ever wondered the difference between CSS Padding and Margin tage?

Padding defines the spacing between your element and the boarder, while the margin defines the spacing between your border and any other outer elements in your CSS layout.

Here is an example that should help further clarify:

1) Border = 0, padding = 0, margin = 0

Sample Text

2) Border = 10px, padding = 0, margin = 0

Sample Text

3) Border = 10px, padding = 10px, margin = 0

Sample Text

As you can see the margin defines the space outside your border and between other elements, while the padding defines the space between your element and the elements border. Hopefully by understanding the difference you can more effectively utilize your CSS margin and CSS padding properties.

It will be worth to add another commonly miss understood difference between innerHTML and innerText.

innerHTML returns all of the markup and content within a given element.

innerText returns all of text content within a given element.

Hi There

InnerHTML of H1 would be: Hi There

InnerText of H1 would be: Hi There

Hope this bit code is helpful for you.

Happy styling 🙂

Categories: CSS Tags:

Types of stylesheet and it’s priority level

There are three types of CSS styles:

  • inline styles
    Inline styles are styles that are written directly in the tag on the document. Inline styles affect only the tag they are applied to.

    <a href="" style="text-decoration: none;">
  • embedded styles
    Embedded styles are styles that are embedded in the head of the document. Embedded styles affect only the tags on the page they are embedded in.

    <style type="text/css"> p { color: #00f; } </style>
  • external styles
             External styles are styles that are written in a separate document and then attached to various Web documents.
             External style sheets can affect any document they are attached to.
<link rel="stylesheet" type="text/css" href="styles.css" />

CSS best practices recommends that you use primarily external style sheets for styling Web pages so that you get the most benefit.

It’s priority level is followings.

Inline styles  has high priority then embedded styles and external styles has the lowest priority.

Happy styling. 😉

Categories: CSS Tags: ,

Access HTML Element using Javascript/JQuery

Java Script

There are two ways to access html element from javascript.

Let us suppose your HTML file has the following content.

<html>

<head>

</head>

<body>

<form >

<input type=”text” id=”txtusername” name=”txtusername” />

<input type=”password” id=”txtpassword” name=”txtpassword” />

<input type=”submit” value=”Submit” />

</form>

</body>

</html>

Then you can access any element using the code lines below

1.          var username=document.getElementById(“txtusername”).value;

2.          var username=  document.forms[0].txtusername.value;

I hope this was helpful to you.

 

JQuery

The code snippet below shows how to access html element from jquery.

Let us suppose your HTML file has following content.

<html>

<head>

/* add jquery library reference in your code.

If you haven’t yet downloaded it then you can download from http://docs.jquery.com/

*/

<script type=”text/javascript” src=”jquery1.4.2.js” />

</head>

<body>

<form >

<input type=”text” id=”txtusername” name=”txtusername” />

<input type=”password” id=”txtpassword” name=”txtpassword” />

<input type=”submit” value=”Submit” />

</form>

</body>

</html>

You can access any element using the below lines:

$(document).ready(function() // function called when page load is complete

{

$username=$(‘#txtusername’).val();

alert(“Hello ! Mr.  “+$username);

});

Hope this small bit of code was helpful to you.

Categories: JavaScript, JQuery Tags: ,

Microsoft Dynamics Sure Step Methodology

Microsoft Dynamics Sure Step gives you a complete methodology-including project management discipline and field-tested best practices-plus user-friendly tools that enable you to more successfully deploy, migrate, configure, and upgrade Microsoft Dynamics solutions, including Microsoft Dynamics CRM. The Sure Step Methodology is available to Microsoft Partners and helps you reduce risk and make deployment and configuration of Microsoft Dynamics solutions much more predictable.Sure Step is the project management Process for Microsoft for Dynamics Projects. Like any other Software Process, Sure Step tells you WHO shall do WHAT and in WHICH ORDER and who is RESPONSIBLE for what. So a software process can be seen as the sum of years of knowledge and best practice in software development. Sure Step defines process phases, milestones roles, artifacts, cross-phase-processes and additional project management processes. Sure Step supports a broad range of products: Dynamics AX, Dynamics NAV, Dynamics GP, Dynamics SL and Dynamics CRM. And different project types: Full Implementation, Rapid Implementation, Optimization and Upgrade. Products and project types can be combined. Microsoft provides the Sure Step Overview Diagram for sales and training situations. Assuming that this is a “Training Situation” I have uploaded the Overview Diagram.

The Process Guide

Microsoft provides both, an electronic process guide, and an editor. The process guide is an HTML Project combined with ActiveX Elements. It is possible to filter the process guide content with the ActiveX Filter. Internet Explorer is required to view the process guid properly. The Editor is part of the Sure Step Package. It allows you to tailor the process to your needs. I’ve encountered several problems running the editor on a non-English windows version. Generating the static content breaks with an error message that some path cannot be found. Solution: Setup an English windows on a virtual pc image and edit the content there.

Phases

Sure Step defines 6 Main Phases and 2 additional phases for optimization and upgrade. It covers the complete lifecycle from project initiation, development, deployment, optimization and upgrade to the next version. A phase ends with a milestone. A milestone is a sum of artefacts created or refined in the phase. If the milestone is accomplished you may start the next phase. At the first look the phases look like a waterfall model, but of course Sure Step isn’t waterfall. Cause waterfall do not works in reality.

Sure Step Phases:

Diagnostic: The diagnostic phase contains analysis of the customer process at a very hi level. Focus of the diagnostic phase is the project initialization; To setup a project plan, agree on an approach and scope definition.

Analysis: In the analysis phase most of the business processes are identified and documented at a high level. If necessary an external specialist helps you to do so. Goal of the analysis phase is to understand the customers business and processes performed. Modeling and documenting the customers business is important. Microsoft Provides a new tool for the modeling: Microsoft Sure Step Business Modeler

Design: Main purpose of the design phase is to find a way how the customers’ processes and needs can be implemented with Dynamics. At this point there may be more than one solution for a topic. You need to identify the best strategy for the implementation phase. Although prototyping is not covered in sure step, this is the point where to build prototypes and do load testing on the prototype implementation.

Development: Most of the programming work is done in the development. Development covers the creation of new features and adaption of existing features as well as the data migration. All features and the data migration has to be tested. Beside feature and data migration testing it is necessary to do security testing. The phase ends when most of the specified features are developed and tested and the data migration is done.

Deployment: Goal of the deployment phase is to setup the operational dynamics environment at the customer. Beside installation, configuration and feature deployment, the phase focuses on testing at system level. So you have to run the user acceptance tests, process tests, security tests and load tests as defined in the test plan. When the system runs and all tests pass the deployment phase is finished.

Operation:

Optimization:

Upgrade:

Cross Phase Processes

While a Phase is a view on the process between milestones, a cross phase process is a view on the process for a specific software engineering discipline. Like the name suggests Cross Phase Processes are performed in several phases. In general, most Cross Phase Processes are performed from project start to end. Without the Management Disciplines, Sure Step defines 8 Cross Phase Processes

Business Process Analysis

Configuration

Data Migration

Infrastructure

Installation

Integration

Testing

Training

Role

Sure Step defines 20 different roles and divides them in “Consulting” and “Customer” roles. Sure Step gives hint what skills are necessary to fulfill a role and typical tasks for the role. A role can be performed by more than one person, eg. there may be more than one Development Consultant. A person may perform more than one role, eg. a consultant may be both Application- and Development Consultant.

Consulting Team: Sales

Executive Sponsor

Account Manager

Sales Representative

Technical Sales Specialist

Consulting Team: Project

Engagement Manager: The Engagement Manager participates only in the starting phase of a project. He is responsible to transfer a sales project into a implementation project.

Project Manager: The project manager is what the name suggests; The project manager. He keeps the project running, allocates resources, maintains the project plan, work break down structure and is the contact person for the Customers project manager. The Project manager has a representative function and coordinates meetings with several team members.

Business Analyst: The BA is a specialist on a certain domain, like production, financial, etc. He supports the project team during the Diagnostic and Analysis Phase. He is responsible for outlining existing processes at the customers company. In the Analysis phase the process knowledge is transferred from the Business Analyst to the Application Consultant.

Application Consultant: The Application Consultant has a deep knowledge of the Dynamics System and modules. He takes part in every project phase from diagnostic to deployment, optimization and upgrade. His main purpose is to bring the customer processes into a Dynamics like form. Optimizing existing processes to fit the Dynamics built in processes and defining new processes.

Solution Architect: The Solution Architect in Sure Step is described somehow as the God of Dynamics. He knows everything! The Solution Architect has a deep knowledge of Dynamics as well as Development in Dynamics. He is familiar with .NET, Visual Studio, BizTalk, Windows Server Systems and of course Database Systems. He knows about the technical aspects about Application Integration, Web services as well as the benefits of a service oriented architecture. By the way the Solution Architect has also skills in business modeling and software documentation.

Development Consultant: The Development Consultant realizes the requirements in Dynamics. He is an expert in Dynamics Development and Development Tools. The Development Consultant has a broad knowledge about .NET and Development with other Microsoft Products. He is familiar with the Microsoft Software stack from Operations Systems and Servers, to Database Servers and SharePoint, BizTalk, etc.

Technology Consultant: The Technology Consultant can be described as a kind of Administrator. He has a deep knowledge on installing and configuring Microsoft Products and especially Dynamics Software. He is responsible for setting up a production, development and testing environment. The Technology consultant is also a networking specialist.

Support Engineer

Customer

Executive Sponsor

Business Decision Maker

Purchase Manager

Project Manager

IT Manager

IT Team Member

Key User

End User

Categories: CRM, CRM 2011 Tags:

How to do a filter lookup on entity with 1:N relation in CRM 2011?

May 16, 2011 Leave a comment

Hi Guys, was just wondering if the filtered lookup have been provided by the standard CRM 2011 system out of box. Just found some days back while I was implementing a requirement for a new client so thought to share it with you all.  Follow the steps below for magic to unwind.

For filtering lookup field of contact related to the parent Customer(Account)
we use the following step for filtered record in this field.

step1-Go to the form of the customize entity and open Primary contact lookup field.

step 2-Go to the related record filtering section of the field property. Here you can see only show record where condition-you select Contact(Parent Customer (Accounts)) and select current record and you can also  allow user turn off filtering by using check-box. Allow user to turn off filter.

step 3- you can also select different  view from the view selector property of the field

After this save the form and publish the customization and you can see the magic that record filtered from the parent contact.

Hope this helps

Categories: CRM 2011 Tags:
%d bloggers like this: