Generic function to set default Entity and default view in MultiSelection lookup

*Generic function to set default Entity in Multilookup and Default View
function setDefaultEntityInMultiLookUpAndView(MultiLookUpSchemaName, DefaultEntityObjTypeCode, DefaultLookupEntityObjTypeCode, EntityLookUpImageUrl, ViewGuid) {
document.getElementById(MultiLookUpSchemaName).setAttribute(“defaulttype”, DefaultEntityObjTypeCode);
document.getElementById(MultiLookUpSchemaName).setAttribute(“lookuptypes”, DefaultLookupEntityObjTypeCode);
document.getElementById(MultiLookUpSchemaName).setAttribute(“lookuptypeIcons”, EntityLookUpImageUrl);
Xrm.Page.getControl(MultiLookUpSchemaName).setDefaultView(ViewGuid);
}

 

pass the parameters to the above function like below

setDefaultEntityInMultiLookUpAndView(“<new_lookupFiledName>”, “2”, “2”, “/_imgs/ico_18_2.gif”, “<View Guid>”);

Advertisements

Validate the Required fileds on MS CRM Form while saving from Custom Button

Some times we may use the Custom button to save the form. In this case using below function we can validate whether Required Form Fields are filled or not programmatically
function IsFormValidForSaving() {
var valid = true;
Xrm.Page.data.entity.attributes.forEach(function (attribute, index) {
if (attribute.getRequiredLevel() == “required”) {
if (attribute.getValue() == null) {
if (valid) {
var control = attribute.controls.get(0);
alert(‘You must provide a value for’ + ‘ ‘ + control.getLabel());
control.setFocus();
}
valid = false;
}
}
});
return valid;
}

 

Cheers,

Reading Query String Parameters using JavaScript

Hi ,

Using below function we can read the Query String Parameters .

 

function getQuerystringParams(key) {
key = key.replace(/[\[]/, “\\\[“).replace(/[\]]/, “\\\]”);
var regex = new RegExp(“[\\?&]” + key + “=([^&#]*)”);
var qs = regex.exec(window.location.href);
if (qs != null) {
return qs[1];
}
return null;
}

 

call like below

var name = getQuerystringParams(“_Name”) ? decodeURIComponent(getQuerystring(“_Name”)) : null;

Cheers,

Microsoft Dynamics CRM Server performance is less than expected

Microsoft Dynamics CRM Server performance is less than expected

 

Microsoft Dynamics CRM Server may perform less than expected and users may experience slow page-load times. This issue can occur if the computer that is running SQL Server where the Microsoft Dynamics CRM databases are stored is configured to support parallel plan queries. This configuration can cause Microsoft Dynamics CRM Server performance to decrease. We recommend that you disable parallel plan query support on this instance of SQL Server.

To resolve this issue, disable parallel plan query support on the instance of SQL Server. To disable parallel plan query support, run the following stored procedure:

exec sp_configure ‘show adv’, 1;

RECONFIGURE WITH OVERRIDE;

exec sp_configure ‘max degree’, 1

RECONFIGURE WITH OVERRIDE;

Exec sp_configure

Verify the output row for ‘max degree of parallelism’ displays a configured value and a run value of 1.

If you want to re-enable parallel plan queries, set the value for ‘max degree of parallelism’ back to zero. For more information about parallel plan query support, see the SQL Server Books Online.

Link from : http://msdn.microsoft.com/en-us/library/dd979074(v=crm.6).aspx

Sql Server Query to Get the Option Set label name

In some of our requirements we may need to query the Option set label name from the back end Sql Server.

For this we need to Query the StringMap table in CRM DB.

Query to get the columns from StringMap table will be Select * from StringMap .

 

In order to get option set label name we need to pass the AttributeValue ,ObjectTypeCode,AttributeName.

for eg : if you want to get the gendercode option set label name in Contact entity need to pass the AttributeValue =’1′ ,ObjectTypeCode=’2′,AttributeName=’gendercode ‘.

Total query is as follows.
select cn.LastName,cn.New_age,cn.New_Nationality,sm.Value as Gender
from Contact cn LEFT JOIN [Orgname_MSCRM].dbo.StringMap sm On sm.AttributeValue=’1′ AND sm.ObjectTypeCode=2 AND sm.AttributeName=’gendercode’ AND sm.LangId=’1033′.

Hope this will helps you.

 

Cheers,

 

New Features in MS CRM 2013

MS CRM 2013 Platform Enhancements

Powerful tools allow you to tailor Microsoft Dynamics CRM to meet your unique business requirements. Microsoft Dynamics CRM facilitates the delivery of rapid business value with an agile solution framework that can be easily tailored and configured. The Microsoft Dynamics CRM platform provides a declarative paradigm that ranges from defining the data model to providing integrated persistence, security, API access, user experience and programming paradigms based on a modern open architecture. This release will introduce several new investments in our platform capabilities to further our commitment to an open, customizable and extensible online service.

Re-imagined User Experience

With an entirely new user experience, Microsoft Dynamics CRM allows you to view everything you need in one spot – fast and fluid, and relevant to the work at hand. No pop-ups. No flipping from one application to the next. What you need, where you need it. Get in, get going and get done. So you can focus on what is most important – your customers.

Reimagined User Experience

MS CRM 2013 forms with productivity in mind by presenting key business data and related activities in a style that maps to the way that people actually work. The new user experience organizes information in a clean, consistent and easy-to-access manner. By giving you all the information you need at one time, you don’t get distracted and you stay on task. The streamlined navigation experience drops down from the top of the screen with a single touch:

Image 1

Image 2

This new navigation model means access to any record is just a touch away. This allows us to display more of what you want – your business data.

Simplified Data Entry:

Your people are busy – working multiple accounts and opportunities all the time. To keep them productive and focused on the task at hand, we’ve introduced new data entry capabilities. Allow your users to easily create any record with Quick Create – an optimized experience to capture key data points for the record being entered.

Simplyfied Data Entry

Quickly add and edit Product line items to your Opportunities, Quotes, Orders and Invoices with inline editable grids. You can input Product details such as price, quantity and discount directly in the grid on the form.

Inline Editable Grids

Track and manage the key people such as stakeholders and sales team members for your deals. Inline lookup and editing makes it easier to understand at a glance who is connected to the record and their role. Your people can even create “New” records inline from within the lookup screen.

Tracking Stack Holders

Customer Summary :
CRM systems are built upon the foundation of relationships. Your CRM system should help you build these relationships with your customers. We’ve made CRM more personal by adding the ability to store images and display location using Microsoft Bing Maps. Images are stored within the CRM database using a new Image attribute type. Each entity can have an image attribute. This attribute is designed to allow a record to store a single image that can be displayed in entity forms that are enabled to display it.

Customer Summary

Introduced a Quick View form that surfaces important Customer information on related forms so you always have your customer data at your fingertips.

Quick View form

Process Excellence & Agility
With guided processes there is no more guessing what to do next. You always know what has been completed, where you are in the process, and what still remains to be done. With the ability to quickly create and modify business processes, your organization can easily adapt to changes in the market.

BPF

Drive effectiveness through pre-defined and configurable processes and enhanced collaborative selling. Each stage of a process is clearly outlined, identifying the recommended steps to completion. Users can move forward and backward in a process, and as they do, they will be presented with a new suggested list of steps.
This is a fresh, intuitive and guided means for users to work through a business process toward a defined outcome. This is a departure from the traditional transactional CRM application to a more process-centric, outcome-oriented and guided experience. This is a deliberate move to focus on outcomes rather than transactions.

A new way to get things done:

Organizations can have multiple processes for each entity. Role-specific process assignment sets the default process and a user can then switch to another process if better suited. Required steps within a stage can be enforced so that users are prevented from progressing to the next stage in the process. The user is notified so it is clear what step they need to complete in order to move forward.

Span multiple entities:

A single Process can span multiple entities (e.g. Lead to Opportunity to Quote to Order to Opportunity), including custom entities. The process helps users navigate across multiple records within the context of the desired outcome. This new approach changes the traditional CRM focus from records and lists to verifiable outcomes.

Customer-driven Update :

Companies that utilize cloud-based technologies have the advantage of having the latest technology available for their business applications. With this rapid cadence, some organizations need the flexibility to prepare their systems and train their users on the latest update. With Microsoft Dynamics CRM Online Fall ’13, we are introducing the flexibility to schedule when you receive these updates. Administrators will receive in-product and Email notifications of their update schedule and include instructions to reschedule the update, if necessary. Email reminders will be sent 90, 30, 15, and 7 days before the update begins.
Business Rules:

Deliver tailored, rule-driven actions across devices without the need of a developer. Business Rules provide a simple declarative interface to implement and maintain fast changing, commonly used business rules that will be applied to CRM forms (Main and Quick Create) for both the web application and CRM for tablets. Set field values, field requirement levels, show or hide fields, enable or disable fields and validate data and show error messages without writing a line of JavaScript code.

Access Teams

Collaboration is key in today’s fast-paced business environment. Your sales teams need to collaborate with a unique set of people within their organization for each Opportunity. Traditional role-based security does not give users this level of flexibility. With a record-based access team, you can add a user to the record and give them access. The access team is a new type of team that doesn’t own records, but, has access to records. Unlike with owner teams, you can create one or more access teams to work on the same records and have team members with different levels of access rights to the record.

Real-time Workflow

The existing workflow execution model that supports asynchronous workflows has been extended to support real-time (synchronous) workflows. Real-time workflows are not queued, as was the case with asynchronous workflows, but execute immediately on-demand or in response to a message being processed by the execution pipeline. Real-time workflows participate in the database transaction and perform similar functionality to plug-ins, yet can be created by a non-developer through the web application workflow designer. Developers can still create real-time workflow through code.

Actions:
Developers can extend the functionality of the standard Microsoft Dynamics CRM system by creating custom messages, with associated request/response classes, known as actions. Actions are new type of processes to expand the vocabulary available for developers to express business processes. With core verbs like Create, Update, Delete, Retrieve, Associate and Assign provided by the system, an action uses those core verbs to create more expressive verbs like Escalate, Approve, Route, and Schedule. If the definition of the action needs to change due to changing business priorities, someone who is not a developer can edit the action using the application workflow designer. Since these actions are available through web service calls, they can be used from both inside the application using a command action or from external applications.
Auto Save

Any of the updated forms now have auto save enabled by default. With auto save enabled there is no Save button displayed in the command bar on the form. Records that have changed data are automatically saved every 30 seconds or when people navigate to a new record. The auto save behavior can be disabled at the organization level in System Settings or at the form level through code.

Enable Custom Mobile Applications

Today’s workforce is mobile and they expect their business application to give them what they need where they need it. This release includes several enhancements to provide flexibility to deliver these powerful mobile applications. Added support for OAuth protocol that is RESTFUL and easier to support for Mobile/Tablet applications. These applications, once they are authenticated through OAuth, can then use either the SOAP endpoint or the REST OData endpoint. The OData web service endpoint has been enhanced with the addition of authentication support for external mobile and rich client applications. Previously, the OData web service endpoint supported only pre-authenticated client (script) code provided in web resources.

Trustworthy Computing Updates

Microsoft continues its commitment to trustworthy computing by complying with the Federal Information Processing Standard
(FIPS 140-2).
Microsoft Dynamics CRM encrypts the credentials stored in CRM to access services such as Yammer or Email providers supported for server-side synchronization.

Office 2013 Compatibility:

Continuing our commitment to deliver CRM functionality through familiar productivity tools such as Microsoft Outlook, Word and Excel, Microsoft will provide support for integration with Microsoft Office 2013. Microsoft Dynamics CRM for Outlook will be supported in Microsoft Outlook 2013 providing contextual capabilities directly within the Outlook experience. Word merge for documents and emails will be supported in Microsoft Word 2013, and the powerful ability to export data to Microsoft Excel for analysis and reporting will be supported in Microsoft Excel 2013. This continues our commitment to delivering the right user experience for the hundreds of millions of Microsoft Office users.